fixyourserver.com

A lot of stuff and things…

How-To: Install ImageMagick – CentOS 6

I’ve been doing a bit of development and one of my latest requirements was ImageMagick. I’m a compile from source kinda guy. I feel that rather than using pre-built RPMs, it’s best to have something built for your needs. It’s the difference between walking into Macy’s and buying a suit off the rack versus going to a tailor. Regardless, on to the good stuff.

1: Install Requirements
yum install tcl-devel libpng-devel libjpeg-devel ghostscript-devel bzip2-devel freetype-devel libtiff-devel

2: Get the source
cd /usr/local/src
wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar -zxf ImageMagick.tar.gz

3: Configure & Make & Install (aside: This takes a while)
./configure --prefix=/usr/ --with-bzlib=yes --with-fontconfig=yes --with-freetype=yes --with-gslib=yes --with-gvc=yes --with-jpeg=yes --with-jp2=yes --with-png=yes --with-tiff=yes --disable-openmp
make
make install

Note that in the above I’m disabling OpenMP. I’m working in a virtual server and this feature causes ImageMagick to run slow.

After this I wanted to check my version:
[root@master ImageMagick-6.8.5-6]# convert --version
convert: error while loading shared libraries: libMagickCore-6.Q16.so.1: cannot open shared object file: No such file or directory

I’ve run into the above error on more than one occasion. Usually, you just need to run ldconfig to resolve this. It will link up the necessary libraries so that ImageMagick works properly.

[root@master /]# /usr/bin/convert --version
Version: ImageMagick 6.8.5-6 2013-05-16 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC
Delegates: bzlib freetype gslib jng jpeg png ps tiff x xml zlib

I’ll get into the PECL extensions and what not when I get that situated.

Next Post

Previous Post

Leave a Reply

© 2017 fixyourserver.com

Theme by Anders Norén