We have been using ImageMagick
for quite some time with out any trouble.
However, today we can across an pdf we were trying to convert into a jpg thumbnail, which would fail:
$ convert example.pdf -resize 600 thumb.jpg
Error: /rangecheck in --run--
Operand stack:
--dict:12/21(L)-- Sh5 0.0 --nostringval-- true 14460 0 --nostringval--
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1846 1 3 %oparray_pop 1845 1 3 %oparray_pop 1829 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- false 1 %stopped_push --nostringval-- --nostringval--
Dictionary stack:
--dict:1158/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:285/300(ro)(G)-- --dict:22/25(L)-- --dict:4/6(L)-- --dict:25/40(L)-- --dict:1/1(ro)(G)-- --dict:9/15(L)-- --dict:5/5(L)-- --dict:2/5(L)-- --dict:1/1(ro)(G)-- --dict:9/15(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
convert: Postscript delegate failed `example.pdf'.
convert: missing an image filename `thumb.jpg'.
So on a test environment (Ubuntu) I was able to install the latest version of ImageMagick
and was able to convert this pdf -> jpg just fine.
The trouble is upgrading this package on RHEL. There is not an update available for ImageMagick
using yum. So I did this:
wget http://www.imagemagick.org/download/linux/CentOS/x86_64/ImageMagick-6.8.4-4.x86_64.rpm
yum erase ImageMagick
yum install --nogpgcheck ImageMagick-6.7.9-6.x86_64.rpm
Note: That yum erase
removed the ImageMagick-devel
as well as the ImageMagick
package.
But now I get this message when trying to run any command line php script:
Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/imagick.so' - libWand.so.10: cannot open shared object file: No such file or directory in Unknown on line 0
And I am nervous to restart apache because our production web-app relies on php-imagick to resize images.
How can I get php to find the new ImageMagick
?