Installing ImageMagic @ Suse 10

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

  1. Prepare
  2. Download the ImageMagic source
  3. Compile and install the package
  4. 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 ( I got mine from

and stored the tarball in /opt. Unpack the tarball

$ tar -xvf ImageMagick-6.6.1-4.tar.gz

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:

# make install
Now the ImageMagick application is installed into your Suse 10 system. Congratulations!
4. Create some symbolic links to make things work
If you execture the convert command, it complains:
# convert
convert: error while loading shared libraries: cannot open shared object file: No such file or directory
The system cannot find a library. First validate where convert is actually installed
# whereis convert
convert: /usr/local/bin/convert
Navigate into/usr/local/bin
# cd usr/local/bin
Find out what libraries are acually called, and where they are expected to be found, using the ldd statement:
# ldd convert =>  (0xbfffe000) => not found => not found => /lib/ (0x40025000) => /lib/ (0x40036000) => /lib/ (0x4004b000) => /lib/ (0x40050000) => /lib/ (0x40075000)
/lib/ (0x40000000)
The system is not capable of finding and Lets find out where they do exist:
# whereis /usr/local/lib/ /usr/local/lib/
# whereis /usr/local/lib/ /usr/local/lib/
That’s where they are, in /usr/local/lib… Lets add this to the LD_LIBRARY_PATH environment variable. First check if this variable already exist (e.g. appending or overwriting?):
# env |grep LD_LIBRARY_PATH
Most likely, you will see it does not already exist, so add it (valid for the current session only):
# export LD_LIBRARY_PATH=/usr/local/lib
Let’s try again if the convert command succeeds:
# convert
Now you will see more verbosing output than will fit your window. You can also try the following to generate the ImageMagic logo:
# convert logo: logo.gif
The trick I did not manage yet is how to set the LD_LIBRARY_PATH for all users/applications. I tried to add it to the .profile file of the user running Alfresco, but Alfresco still could not find the same library that we fixed by adding the LD_LIBRARAY_PATH. I am open for a good suggestion!
My alternative is to create some symbolic links into /usr/lib pointing at the libraries as installed in /usr/local/lib: (beware, be root)
# cd /usr/lib/
# ln -s /usr/local/lib/
# ln -s /usr/local/lib/
Create  the folders ImageMagic/bin into your %Alfresco_home% (I installed Alfresco into /opt/alfresco, so I created /opt/alfresco/ImageMagic/bin. Navigate to this ImageMagic/bin directory and create a symbolic link to the convert command (find out where this command lives using whereis convert):
# ln -s /usr/local/bin/convert
Restart Alfresco, and validate that there are no more errors starting/finding ImageMagic!
Related posing: Installing SWFTools @ Suse 10

3 Responses to “Installing ImageMagic @ Suse 10”

  1. 1 Tony Miller April 27, 2010 at 16:36

    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:

    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.

  2. 2 Patrick Bossard August 3, 2010 at 11:31

    You should also use the ‘ldconfig’ command line after your ‘make install’ statement.

    It worked fine for me.

    # ldd /usr/local/bin/convert => (0x00007fffffffe000) => not found => not found => /usr/lib/ (0x00007f0c073cf000) => /usr/lib/ (0x00007f0c071ad000) => /usr/lib/ (0x00007f0c06f88000) => /usr/lib/ (0x00007f0c06d71000) => /lib/ (0x00007f0c06b55000) => /lib/ (0x00007f0c06951000) => /usr/lib/ (0x00007f0c06749000) => /lib/ (0x00007f0c064c6000) => /lib/ (0x00007f0c06173000)
    /lib64/ (0x00007f0c07628000) => /lib/ (0x00007f0c05f6a000)

    # ldconfig
    # convert -version
    Version: ImageMagick 6.6.2-6 2010-08-03 Q16
    Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
    Features: OpenMP

    # ldd /usr/local/bin/convert => (0x00007f71a7ede000) => /usr/local/lib/ (0x00007f71a7794000) => /usr/local/lib/ (0x00007f71a74a8000) => /usr/lib/ (0x00007f71a724f000) => /usr/lib/ (0x00007f71a702d000) => /usr/lib/ (0x00007f71a6e08000) => /usr/lib/ (0x00007f71a6bf1000) => /lib/ (0x00007f71a69d5000) => /lib/ (0x00007f71a67d1000) => /usr/lib/ (0x00007f71a65c9000) => /lib/ (0x00007f71a6346000) => /lib/ (0x00007f71a5ff3000)
    /lib64/ (0x00007f71a7cc4000) => /lib/ (0x00007f71a5dea000)

  3. 3 Julian Cook September 29, 2010 at 19:11

    This post of yours has saved me HOURS of figuring out this problem. Thank you so MUCH!

Comments are currently closed.