I like the Debian apt-get package mechanism, it simply works (Posting the statement
$sudo apt-get install imagemagick
would finalize this post. In Suse however…). Recently I had to install on a Suse 10 (SLES) linux system. Although I had root access, I lack the knowledge/experience how to get the repositories of the configurations to get YAST install whatever I need.
Still, my installation of Alfresco Share had to get up and running, so I prepared to compile ImageMagic myself. See my post about Installing SWFTools @ Suse 10 as well.
I assume you can find the command line and you have privileges like root; you have to have access YAST and install applications.
The main steps are easy
- Prepare
- Download the ImageMagic source
- Compile and install the package
- Create some symbolic links to make things work (with Alfresco)
1. Prepare
You need to have a gcc compiler in order to compile packages. Use YAST to install the compiler and the dependencies it needs (being root):
# yast -i gcc
2. Download the ImageMagic source
I downloaded the most recent stable distribution from a mirror close to me. See the ImageMagic website for a list of mirrors, or get it directly from their site (http://www.imagemagick.org/). I got mine from
ftp://ftp.nluug.nl/pub/ImageMagick/ImageMagick-6.6.1-4.tar.gz
and stored the tarball in /opt. Unpack the tarball
A new directory will be created containing all source files.
3. Compile and install the package
This sounds more nerdy than it actually is. Navigate into the directory ImageMagick-6.6.1-4 (or any newer version number available). Execute the following commands, and verify they completed successfully: (remind, the ./ in the first command is mandatory!)
$ ./configure
$ make
Run the followingt command as root:
linux-gate.so.1 => (0xbfffe000)
libMagickCore.so.3 => not found
libMagickWand.so.3 => not found
libbz2.so.1 => /lib/libbz2.so.1 (0x40025000)
libpthread.so.0 => /lib/libpthread.so.0 (0x40036000)
libdl.so.2 => /lib/libdl.so.2 (0x4004b000)
libm.so.6 => /lib/libm.so.6 (0x40050000)
libc.so.6 => /lib/libc.so.6 (0x40075000)
/lib/ld-linux.so.2 (0x40000000)
libMagickCore.so: /usr/local/lib/libMagickCore.so /usr/local/lib/libMagickCore.so.3
libMagickWand.so: /usr/local/lib/libMagickWand.so /usr/local/lib/libMagickWand.so.3
# ln -s /usr/local/lib/libMagickCore.so.3
# ln -s /usr/local/lib/libMagickWand.so.3
Since you’re talking about Linux (I know RedHat/Fedora more than SLES), the easiest way to manipulate the dynamic library search paths is with ldconfig:
http://www.oreillynet.com/linux/cmd/cmd.csp?path=l/ldconfig
Put /usr/local/lib in the search path, run ldconfig as root, then every user and program will have the path in the shared library search path. It eliminates having to set LD_LIBRARY_PATH.
You should also use the ‘ldconfig’ command line after your ‘make install’ statement.
It worked fine for me.
# ldd /usr/local/bin/convert
linux-vdso.so.1 => (0x00007fffffffe000)
libMagickCore.so.3 => not found
libMagickWand.so.3 => not found
libjasper.so.1 => /usr/lib/libjasper.so.1 (0x00007f0c073cf000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00007f0c071ad000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00007f0c06f88000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f0c06d71000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f0c06b55000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f0c06951000)
libgomp.so.1 => /usr/lib/libgomp.so.1 (0x00007f0c06749000)
libm.so.6 => /lib/libm.so.6 (0x00007f0c064c6000)
libc.so.6 => /lib/libc.so.6 (0x00007f0c06173000)
/lib64/ld-linux-x86-64.so.2 (0x00007f0c07628000)
librt.so.1 => /lib/librt.so.1 (0x00007f0c05f6a000)
# ldconfig
# convert -version
Version: ImageMagick 6.6.2-6 2010-08-03 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP
# ldd /usr/local/bin/convert
linux-vdso.so.1 => (0x00007f71a7ede000)
libMagickCore.so.3 => /usr/local/lib/libMagickCore.so.3 (0x00007f71a7794000)
libMagickWand.so.3 => /usr/local/lib/libMagickWand.so.3 (0x00007f71a74a8000)
libjasper.so.1 => /usr/lib/libjasper.so.1 (0x00007f71a724f000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00007f71a702d000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00007f71a6e08000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f71a6bf1000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f71a69d5000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f71a67d1000)
libgomp.so.1 => /usr/lib/libgomp.so.1 (0x00007f71a65c9000)
libm.so.6 => /lib/libm.so.6 (0x00007f71a6346000)
libc.so.6 => /lib/libc.so.6 (0x00007f71a5ff3000)
/lib64/ld-linux-x86-64.so.2 (0x00007f71a7cc4000)
librt.so.1 => /lib/librt.so.1 (0x00007f71a5dea000)
This post of yours has saved me HOURS of figuring out this problem. Thank you so MUCH!
Julian