Go into /usr/local/src directory
cd /usr/local/src
First, we need to get all the required libraries...
yum search ImageMagick-devel
(depending on what distribution you have, you'll get different file name extensions... for CentOS 4.6 x86 we get 'i386')
yum install ImageMagick-devel<strong>.i386</strong>
(this will install all the dependent/required libraries as well...)
********* optional ************
you can compile/install the libraries from source...note: for Centos 4.6 I also had to use yum to install the jpeg library since jpegsrc.v6b wouldn't compile correctly (it would install and I'll have to copy all the files from source into /usr/local/lib , however ImageMagick would fail every time at checking jpeg_header during ./configure , so jpg images wouldn't work, duh)
yum install libjpeg-devel
you can grab the latest sources and install as usual:
- FreeType
- Ghostscript fonts
- JPEG (this is what wouldn't install 100% (where yum install libjpeg-devel) was needed
- PNG
- WMF
You may also want to install
- TIFF to read and write TIFF images.
- Ghostscript, to read and write PDF and Postscript files.
- LCMS, to perform ICC CMS color management.
- libexif, to handle EXIF tags
- libxml, to read SVG images
- the ZLIB library, to handle compressed PNG and MIFF images.
- the BZIP library, to read and write bzip2-compressed MIFF images.
********* END: optional ************
Install ImageMagick
Download the latest version (or previous version if the latest won't compile)
ftp://ftp.imagemagick.org/pub/ImageMagick/
at the time of this writing ImageMagick-6.4.0 wouldn't compile on CentOS 4.6 but ImageMagick-6.3.9 would (this is a problem with the compiler and not imagemagick)
wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.3.9-10.tar.gz
tar xvfz ImageMagick-6.3.9-10.tar.gz
cd ImageMagick-6.3.9-10
<sub>(** you can find additional <a href="http://magick.imagemagick.org/script/advanced-unix-installation.php#configure">./configure options here</a> **)
(** --enable-shared is enabled by default in this version, don't know about previous ones; but it doesn't hurt to add it anyway**)</sub>
./configure --enable-shared
make
make install
NOTE: sometimes it's quicker to do the following, however, for some reason this froze on me several times when compiling ImageMagick... also, had problems with Ghostscript... so i would recommend doing this only for smaller compilations:
./configure && make && make install