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

I have 2 debian servers we use at work, one is our development server and the other is our production. I am trying to get imagemagick working on both servers, and for some reason the production server is running imagemagick fine, but the dev server doesnt' seem to want to.

On both servers I typed

convert --version

and got this response in return

PRODUCTION:

Version: ImageMagick 6.6.0-4 2012-04-24 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP

DEVELOPMENT:

convert: error while loading shared libraries: libMagickCore.so.2: cannot open shared object file: No such file or directory

I did a dpkg against both servers to check versions and I got the following

PRODUCTION:

ii  imagemagick                         8:6.6.0.4-3+squeeze2         image manipulation programs
ii  libmagickcore3                      8:6.6.0.4-3+squeeze2         low-level image manipulation library
ii  libmagickcore3-extra                8:6.6.0.4-3+squeeze2         low-level image manipulation library - extra codecs
ii  libmagickwand3                      8:6.6.0.4-3+squeeze2         image manipulation library
ii  php5-imagick                        3.0.0~rc1-1                  ImageMagick module for php5

DEVELOPMENT:

ii  imagemagick                         8:6.6.0.4-3+squeeze2         image manipulation programs
ii  libmagickcore3                      8:6.6.0.4-3+squeeze2         low-level image manipulation library
ii  libmagickcore3-extra                8:6.6.0.4-3+squeeze2         low-level image manipulation library - extra codecs
ii  libmagickwand3                      8:6.6.0.4-3+squeeze2         image manipulation library
ii  php5-imagick                        3.0.0~rc1-1                  ImageMagick module for php5

I looked all over the OS for libMagickCore.so.2 and could never find it, I did find these files on both servers.

PRODUCTION:

lrwxrwxrwx  1 root root    22 May  2 14:32 libMagickCore.so.3 -> libMagickCore.so.3.0.0
-rw-r--r--  1 root root  2.3M Apr 24 15:44 libMagickCore.so.3.0.0
lrwxrwxrwx  1 root root    22 May  2 14:32 libMagickWand.so.3 -> libMagickWand.so.3.0.0
-rw-r--r--  1 root root  1.1M Apr 24 15:44 libMagickWand.so.3.0.0

DEVELOPMENT:

lrwxrwxrwx  1 root root    22 May  2 14:35 libMagickCore.so.2 -> libMagickCore.so.3.0.0
lrwxrwxrwx  1 root root    22 May  2 14:30 libMagickCore.so.3 -> libMagickCore.so.3.0.0
-rw-r--r--  1 root root  2.3M Apr 24 15:44 libMagickCore.so.3.0.0
lrwxrwxrwx  1 root root    22 May  2 14:30 libMagickWand.so.3 -> libMagickWand.so.3.0.0
-rw-r--r--  1 root root  1.1M Apr 24 15:44 libMagickWand.so.3.0.0

I manually added in the libMagickCore.so.2 onto the dev server to see if that would work, but it didn't.

I purged all of imagemagick from the dev server and reinstalled it and still nothing. I ran ldconfig, and it will create links for version 3 but not 2. I've even rebooted the machine, did updates/upgrades on both machines, and I'm just out of options of what to do. Anyone out there have another idea for me?

Thanks a million!

-- EDIT --

Running the command

which convert

produced these outputs

PRODUCTION

/usr/bin/convert

DEVELOPMENT

/usr/local/bin/convert

So ... that ended up being my problem ... I removed the convert in /usr/local/bin off of my development server and it worked after that.

share|improve this question
    
Can you add the output from which convert please? –  ablackhat May 2 '12 at 21:38
1  
ablackhat, add that as an answer and I'll accept it, you saved me enumorous amounts of frustratingly crappy hours! –  stmpy May 2 '12 at 23:20
add comment

2 Answers 2

I'm glad you solved the issue. To help others in a similar situation I'll just leave this here:

To find the library locally:

# updatedb
# locate libMagickCore

To find the library from the package manager:

# apt-file search  libMagickCore

To find if your library can be found by the system (is it in path)

# ldconfig -p | grep -i nameoflibrary

If your library is not on the list, but is on the system you can add it:

# ldconfig -n /path/toyournew/library/

Add it permanently to the path:

# /etc/ld.so.conf.d/libc.conf

This should be enough to solve this type of problem in the future no matter the library.

share|improve this answer
add comment

I took the advice from ablackhat and did which convert this showed me that my development server was looking in /usr/local/bin for the convert executable. I deleted the executable from that directory and running which convert after that showed that my server was now using the executable in /usr/bin. When I ran convert --version off of the /usr/bin/convert everything worked as hoped.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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