The Giant Automagical ImageMagick and Fonts install script

Recently I’ve run into issues with inconsistent ImageMagick installations, which mainly manifest in the form of fonts for annotations etc not working properly, or missing delegates.

Finally I got fed up with repeating this drama every time, so in addition to updating my stack scripts I have put together a script which does all the ImageMagick stuff in one hit, for those one-off installs.

This script installs:

  • Ghostscript Fonts 8.11
  • Freetype 2.4.1
  • Fontconfig 2.8.0
  • Ghostscript 8.71
  • JPEG Lib 8b
  • Zlib 1.2.5
  • libTiff 3.8.2
  • libpng 1.4.3
  • and finally, ImageMagick 6.6.3-1

Download it here.

To run (with extra automagical):

wget -O- http://shares.amasses.net/image_magick_installer | sudo sh

To run (normally…):

chmod +x image_magick_installer
sudo ./image_magick_installer

And then to test the install:

convert -v

I have found that occasionally there are errors like:

error while loading shared libraries: libMagickCore.so.4: cannot open shared object file: No such file or directory

Try running the following, and if it works, put it into a .sh file in /etc/profile.d (e.g. /etc/profile.d/image_magick_ldd.sh):

#!/bin/sh

export LDFLAGS="-L/usr/local/lib -Wl,-rpath,/usr/local/lib"
export LD_LIBRARY_PATH="/usr/local/lib"
ldd /usr/local/bin/convert > /dev/null

Enjoy

  • http://www.linuxquestions.org/questions/linux-software-2/imagemagick-6-3-8-vs-debian-lenny-828310/#post4076836 ImageMagick 6.3.8+ vs Debian Lenny

    [...] it complained about not being able to find libMagickCore.4.so. Semi-following the directions at http://railsmonkey.net/2010/07/the-g…nstall-script/ I was able to get it to find THAT, but now it's complaining that there's "no decode delegate [...]

  • http://carlosalbertoteixeira.myopenid.com/ Carlos Alberto Teixeira

    Dear Matthew, greetings from Rio!

    Your post is absolutely perfect. 1,000 thanks!!

    Cheers.

    - c.a.t.

  • http://carlosalbertoteixeira.myopenid.com/ Carlos Alberto Teixeira

    Dear Matthew, greetings from Rio!

    Your post is absolutely perfect. 1,000 thanks!!

    Cheers.

    - c.a.t.

  • Anonymous

    Hi Carlos,

    Your more then welcome – I’m glad this helped someone else :)

    Matthew

  • edo

    Nice! :)

    What happens if I already have older versions of all this stuff on my system, do I have to uninstall it all first?

  • edo

    BTW, the download says something of “access denied”.

  • Matthew Savage

    Sorry about that – I’d made some updates and forgot to reset the permissions for it :/ Should be all fixed now though!

  • Matthew Savage

    Personally I have never had issues with leaving the older versions in place – the executables are overwritten and reinstalling the rmagick gem will use the latest libs – though, I could be wrong :|

  • Anonymous

    Sorry about that – its all fixed up now, I pushed an update to the file sources (no more version issues with missing files) and forgot to fix up the permissions.

  • Anonymous

    Personally I have never had issues with leaving the older versions in place – the executables are overwritten and reinstalling the rmagick gem will use the latest libs – though, I could be wrong :|

  • edo

    Thank you! :)

    Worked, finally I was able to install a newer rmagick-gem despite the old ImageMagick of the OS.