Installing ImageMagick

Problem

Installing ImageMagick can be a problem sometimes. If installing from CPAN doesn't work, and you don't know what version to choose from what ftp server, your last resort is to install ImageMagick from source.

Context

The instructions here assume you are using RedHat. Other platforms may be covered later.

Solution

Install libjpeg-devel (needed for ImageMagick):
$ yum install libjpeg-devel

Install libpng-devel (needed for ImageMagick):
$ yum install libpng-devel

Install ImageMagick from source:
$ wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
$ gunzip -c ImageMagick.tar.gz | tar xvf -
$ cd ImageMagick-6.?.?
$ ./configure -with-perl=/usr/bin/perl
$ make; make install

Ensure that the ImageMagick libraries will be picked up by the system.
Edit /etc/ld.so.conf and add the following line to the end of the file:
/usr/local/lib/

Then run the following command to update the library database:
$ /sbin/ldconfig

Test if ImageMagick is installed:
convert -version

Test if ImageMagick works:
convert -size 100x60 xc:skyblue -fill white -stroke black -draw "rectangle 20,10 80,50" test.gif
This should generate a GIF file.

Test if PerlMagick works:
$ perl -MImage::Magick -e 1
If the output from this command is blank then all is well.

-- ArthurClemens - 06 May 2012

BestPracticeTipsForm edit

Category Installation and Upgrading
Related Topics
Topic revision: r2 - 06 May 2012, ArthurClemens
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy