[BlueOnyx:18277] Re: imagick error after update

Michael Stauber mstauber at blueonyx.it
Sat Aug 29 11:50:52 -05 2015


Hi Michael,

> After ImageMagick was updated by the latest Yum update I get the following
> error from PHP scripts.
> 
> PHP Warning:  PHP Startup: Unable to load dynamic library
> '/home/solarspeed/php/lib/php/20121212/imagick.so' - libMagickWand.so.2:
> cannot open shared object file: No such file or directory in Unknown on line
> 0
> 
> It looks like the SolarSpeed PHP is looking for libMagickWand.so.2 and
> libMagickCore.so.2 but the server now has libMagickWand.so.5 and
> libMagickCore.so.5

This is pretty sad. Looks like RedHat parted with the philosophy not to
deprecate libraries during minor updates like from 6.6 to 6.7. At least
as far as MagickWand is concerned.

But it's a PECL module, so it's easy to fix:

1.) Check if you're affected. If the command ...

/home/solarspeed/php/bin/php -m

... returns this, then you are affected:

PHP Warning:  PHP Startup: Unable to load dynamic library
'/home/solarspeed/php/lib/php/20131226/imagick.so' - libMagickWand.so.2:
cannot open shared object file: No such file or directory in Unknown on
line 0

2.) In that case run this command. It will uninstall the "imagick" PECL
module:

/home/solarspeed/php/bin/pecl uninstall imagick

3.) Next run this command to download, compile and reinstall the correct
"imagick" module:

/home/solarspeed/php/bin/pecl install imagick

That command will ask a question (or two?). Simply press return for it
to continue.

That should fix it.

I'll script this fix and will publish it to the YUM repositories so that
it'll be automatically performed for everyone who has the Solarspeed PHP
installed.

That way we can make do without everyone having to upgrade their PHP
PKGs to versions that include an imagick.so that was compiled for 6.7.
Which probably wouldn't work well on boxes that are behind on YUM
updates anyway.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list