ImageMagick under /usr/local/cpanel/src/3rdparty/gpl

sehh

Well-Known Member
Feb 11, 2006
579
6
168
Europe
My servers use CentOS 4.8, which is rather old, so the default RPM package for ImageMagick is version 6.0.

But, when I run "convert --version" I noticed that my run-time version is actually 6.3.3, which is installed under /usr/local/bin. Which sounds like a custom compiled version that came with my servers when they were first setup and cPanel was installed.

Ok, so the .src archive must have been used to "make" and "make install" the 6.3.3 version, and after looking around, I found this directory:

/usr/local/cpanel/src/3rdparty/gpl

Interestingly, it has a lot of stuff used by cPanel "under the hood". One archive is "ImageMagick-6.4.8-2.tar.gz".

So here are my questions:

Is this directory an official one? Does everyone have it with loads of archives of various tools?

What is the correct way to upgrade to the latest version of ImageMagick, without braking cPanel? Should I decompress the "ImageMagick-6.4.8-2.tar.gz" archive from that directory, and "make install" it?

Any help would be appreciated.

Thank you.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hi sehh,

You could simply run:

Code:
/scripts/installimagemagick --force
To see the results. I tried this on my system, and it installed the following:

Code:
# convert --version
Version: ImageMagick 6.4.8 2010-10-14 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
As for /usr/local/cpanel/src/3rdparty/gpl location, yes, many applications we utilize are stored in that location for retrieval.
 

sehh

Well-Known Member
Feb 11, 2006
579
6
168
Europe
I tried and got:

# /scripts/installimagemagick --force
Out of memory during "large" request for 33558528 bytes, total sbrk() is 124172288 bytes at /usr/lib/perl5/site_perl/5.8.7/i686-linux/Image/Magick.pm line 42.
END failed--call queue aborted.
I'm using the latest STABLE.
 

sehh

Well-Known Member
Feb 11, 2006
579
6
168
Europe
ok I run it again and it completed with:

...
/usr/bin/install -c -m 644 'wand/pixel-view.h' '/usr/include/ImageMagick/wand/pixel-view.h'
/usr/bin/install -c -m 644 'wand/pixel-wand.h' '/usr/include/ImageMagick/wand/pixel-wand.h'
/usr/bin/install -c -m 644 'wand/stream.h' '/usr/include/ImageMagick/wand/stream.h'
make[2]: Leaving directory `/home/cpimkbuild/ImageMagick-6.4.8-2'
make[1]: Leaving directory `/home/cpimkbuild/ImageMagick-6.4.8-2'
ImageMagick installed ok
But when I run it I see its still version 6.3.3:

# convert --version
Version: ImageMagick 6.3.3 04/12/07 Q16 file:///usr/local/share/doc/ImageMagick-6.3.3/index.html
Copyright: Copyright (C) 1999-2007 ImageMagick Studio LLC
I looked at the binary "convert" (part of the ImageMagick), and its located in two places:

/usr/bin/convert
/usr/local/bin/convert

The first is the new 6.4.8 version, and the second is the old 6.3.3, but my path executes binary files from the /usr/local/bin path first.

Can you please tell me how to uninstall the old 6.3.3 version from /usr/local/bin please?

Thank you.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Simply try moving /usr/local/bin/convert and symlink the other one:

Code:
mv /usr/local/bin/convert /usr/local/bin/convert.bak
ln -s /usr/bin/convert /usr/local/bin/convert
 

sehh

Well-Known Member
Feb 11, 2006
579
6
168
Europe
That was my just thought as well, but then I found out that the old ImageMagick was installed with "make install" from the source package and there are a lot more files under /usr/local/ than just the base commands like "convert".

For example:

# find /usr/local -iname "*magick*"
/usr/local/bin/Magick-config
/usr/local/bin/Magick++-config
/usr/local/lib/libMagick++.la
/usr/local/lib/libMagick.a
/usr/local/lib/libMagick++.a
/usr/local/lib/pkgconfig/ImageMagick++.pc
/usr/local/lib/pkgconfig/ImageMagick.pc
/usr/local/lib/libMagick.la
/usr/local/lib/ImageMagick-6.3.3
/usr/local/include/Magick++
/usr/local/include/magick
/usr/local/include/magick/magick.h
/usr/local/include/magick/magick-config.h
/usr/local/include/magick/ImageMagick.h
/usr/local/include/magick/magick-type.h
/usr/local/include/magick/MagickCore.h
/usr/local/include/wand/MagickWand.h
/usr/local/include/wand/magick-property.h
/usr/local/include/wand/magick_wand.h
/usr/local/include/wand/magick-wand.h
/usr/local/include/wand/magick-image.h
/usr/local/include/Magick++.h
/usr/local/share/man/man1/ImageMagick.1
/usr/local/share/man/man1/Magick-config.1
/usr/local/share/man/man1/Magick++-config.1
/usr/local/share/doc/ImageMagick-6.3.3
/usr/local/share/doc/ImageMagick-6.3.3/images/fuzzy-magick.png
/usr/local/share/doc/ImageMagick-6.3.3/www/magick-wand.html
/usr/local/share/doc/ImageMagick-6.3.3/www/Magick++
/usr/local/share/doc/ImageMagick-6.3.3/www/Magick++/ImageMagick.png
/usr/local/share/doc/ImageMagick-6.3.3/www/Magick++/Magick++.png
/usr/local/share/doc/ImageMagick-6.3.3/www/magick-core.html
/usr/local/share/doc/ImageMagick-6.3.3/www/ImageMagickObject.html
/usr/local/share/doc/ImageMagick-6.3.3/www/magick.css
/usr/local/share/doc/ImageMagick-6.3.3/www/perl-magick.html
/usr/local/share/doc/ImageMagick-6.3.3/www/magick-vector-graphics.html
/usr/local/share/doc/ImageMagick-6.3.3/www/api/magick-wand.html
/usr/local/share/doc/ImageMagick-6.3.3/www/api/magick-property.html
/usr/local/share/doc/ImageMagick-6.3.3/www/api/magick.html
/usr/local/share/doc/ImageMagick-6.3.3/www/api/magick-image.html
/usr/local/share/ImageMagick-6.3.3
and the above is by just looking for the keyword "magick".

is there a proper way to uninstall the whole thing?