Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

This question already has an answer here:

I have already installed ImageMagick on my server which is running centos 6.4

yum install ImageMagick

Version is very old : 6.5.4-7 2012-05-07 Q16

I discussed about this with ImageMagick's official forum. They told i am running older version of ImageMagick.

With yum, we generally don't need to worry about dependencies. I created few scripts which are using the ImageMagick's latest version. But my server is running the older version to support those scripts.

1) So, If i remove the yum version of ImageMagick, which dependencies should be installed before compiling ImageMagick? The scripts which are running properly shouldn't get affected by this update.

2) Right now, /usr/bin/convert is the path. How do i compile keeping the same path?

--prefix="/usr" (is it right?)

I don't have any test server. So, I need your help. I am windows(7) user!

share|improve this question

marked as duplicate by EEAA, gWaldo, Ward, Falcon Momot, mdpc Aug 30 '13 at 19:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

wait a second... –  GioMac Aug 30 '13 at 11:56
i'll write complete rpm build manual for Imagemagick for you –  GioMac Aug 30 '13 at 12:00

2 Answers 2

up vote 3 down vote accepted
  1. Install rpmbuild: yum install rpmbuild -y

  2. Install src.rpm from Fedora repo:

    rpm -Uvh "http://mirror.switch.ch/ftp/mirror/fedora/linux/releases/19/Fedora/source/SRPMS/i/ImageMagick-"

  3. cd ~/rpmbuild/SPECS

  4. Build package for your platform (replace x86_64 with i686 if you are running i686):

    rpmbuild --target x86_64 -ba ImageMagick.spec

  5. If there are any dependencies - rpmbuild will tell you about that, so install these packages with yum install

  6. Try to build it again:

    rpmbuild --target x86_64 -ba ImageMagick.spec

Result will be:

Wrote: /root/rpmbuild/SRPMS/ImageMagick-
Wrote: /root/rpmbuild/RPMS/x86_64/ImageMagick-
Wrote: /root/rpmbuild/RPMS/x86_64/ImageMagick-devel-
Wrote: /root/rpmbuild/RPMS/x86_64/ImageMagick-djvu-
Wrote: /root/rpmbuild/RPMS/x86_64/ImageMagick-doc-
Wrote: /root/rpmbuild/RPMS/x86_64/ImageMagick-perl-
Wrote: /root/rpmbuild/RPMS/x86_64/ImageMagick-c++-
Wrote: /root/rpmbuild/RPMS/x86_64/ImageMagick-c++-devel-

Install built packages with rpm -Uvh

I do this way and I don't have any problems so far. If you will encounter any problems - there will be deprecated functions or you need to rebuild packages which contain components built with ImageMagick-devel, not the ImageMagick.

Expected configuration will look like this:

                  Option                        Value
Shared libraries  --enable-shared=yes           yes
Static libraries  --enable-static=no            no
Module support    --with-modules=yes            yes
GNU ld            --with-gnu-ld=yes             yes
Quantum depth     --with-quantum-depth=16       16
High Dynamic Range Imagery
                  --enable-hdri=no              no

Delegate Configuration:
BZLIB             --with-bzlib=yes              yes
Autotrace         --with-autotrace=no           no
Dejavu fonts      --with-dejavu-font-dir=default        /usr/share/fonts/dejavu/
DJVU              --with-djvu=yes               yes
DPS               --with-dps=no         no
FFTW              --with-fftw=yes               no
FlashPIX          --with-fpx=yes                no
FontConfig        --with-fontconfig=yes         yes
FreeType          --with-freetype=yes           yes
GhostPCL          None                          pcl6 (unknown)
GhostXPS          None                          gxps (unknown)
Ghostscript       None                          gs (8.70)
Ghostscript fonts --with-gs-font-dir=default    /usr/share/fonts/default/Type1/
Ghostscript lib   --with-gslib=yes              yes
Graphviz          --with-gvc=no
JBIG              --with-jbig=yes               no
JPEG v1           --with-jpeg=yes               yes
JPEG-2000         --with-jp2=yes                yes
LCMS v1           --with-lcms=yes               yes
LCMS v2           --with-lcms2=yes              no
LQR               --with-lqr=yes                no
LZMA              --with-lzma=yes               no
Magick++          --with-magick-plus-plus=yes   yes
OpenEXR           --with-openexr=yes            yes
PERL              --with-perl=yes               /usr/bin/perl
PANGO             --with-pango=yes              yes
PNG               --with-png=yes                yes
RSVG              --with-rsvg=yes               yes
TIFF              --with-tiff=yes               yes
WEBP              --with-webp=yes               no
Windows fonts     --with-windows-font-dir=      none
WMF               --with-wmf=yes                yes
X11               --with-x=yes                  yes
XML               --with-xml=yes                yes
ZLIB              --with-zlib=yes               yes

So, everything is built according to current system.

For the same (just rebuild), it's possible to run rpmbuild --rebuild --target x86_64 ImageMagick- - result will be same if you don't want to make any changes in the future.

share|improve this answer
yum remove ImageMagick yum remove ImageMagick-devel - are those important before i do the build? whereis convert -> will it be /usr/share/convert? --> I need it to be in /usr/bin/convert –  Kamini Aug 30 '13 at 12:27
No, it's not required - both will be upgraded anyway. convert will be in the PATH (/usr/bin/convert) :) –  GioMac Aug 30 '13 at 12:29
how do i update the version in future? | Can i use imagemagick.org/download/linux/CentOS/x86_64/… (Redhat / CentOS 5.8 x86_64 RPM) –  Kamini Aug 30 '13 at 13:14
yes, but I'm not sure yet about changes –  GioMac Aug 30 '13 at 13:21
Better to use mock because it will handle all of the dependencies automatically (provided CentOS actually has them) and keep the build free of contamination from the host system. –  Michael Hampton Aug 30 '13 at 15:09

I think this thread explains your requirements. Although the procedure is for CentOS 6.3 I wouldn't expect any serious problems to rebuild it on 6.4.

share|improve this answer
I saw this thread already. It is RPM. I don't know how has it been compiled. –  Kamini Aug 30 '13 at 11:59
Yep, download the SRPM package from imagemagick.mirrorcatalogs.com/linux/SRPMS and continue with yum install and rpmbuid commands as written in that thread. –  dsmsk80 Aug 30 '13 at 12:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.