Page 1 of 1

The ImageMagick 'convert' command may not work with postscript files

Posted: 2012/03/12 13:35:31
by emc2
Hi guys,

I've been searching for a long time now on how to fix my convert command. It was working and stopped about a month ago.. I've found a confirmation of the problem at the [url=https://access.redhat.com/knowledge/solutions/72303]redhat site[/url] but you need a subscription to access the solution.

Enviroment:

- ghostscript-8.70-14.el5
- ImageMagick-6.2.8.0-12.el5

Here is how to reproduce:

[code][root@ home]# convert test.ps test.png
Error: /undefinedfilename in (72x72)
Operand stack:

Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push \
--nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push
Dictionary stack:
--dict:1154/1684(ro)(G)-- --dict:0/20(G)-- --dict:70/200(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
Error: /undefinedfilename in (72x72)
Operand stack:

Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push \
--nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push
Dictionary stack:
--dict:1154/1684(ro)(G)-- --dict:0/20(G)-- --dict:70/200(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
convert: no decode delegate for this image format `test.ps'.
convert: Postscript delegate failed `test.ps'.
convert: missing an image filename `test.png'.
[/code][Moderator edit: Wrapped long lines.]

If anyone can help I would be very grateful.

Re: The ImageMagick 'convert' command may not work with postscript files

Posted: 2012/03/12 16:03:32
by gmhphillips
Here is the Resolution from the RedHat Knowledgebase:

Resolution
As a workaround, please revert back to ImageMagick-6.2.8.0-4.el5_5.3. A permanent solution is currently under investigation.

I have the same problem and will be trying this soon.

Gregg.

Re: The ImageMagick 'convert' command may not work with postscript files

Posted: 2012/03/12 21:06:26
by jkhord
Yes, I can confirm that installing ImageMagick-6.2.8.0-4.el5_5.3 from the CentOS 5.7 tree fixes the immediate problem

Re: The ImageMagick 'convert' command may not work with postscript files

Posted: 2012/03/13 01:55:11
by emc2
Thanks heaps guys!

For anyone else with this issue I did the following to resolve it:

[code]cd /usr/src
wget ftp://fr2.rpmfind.net/linux/centos/5.7/os/x86_64/CentOS/ImageMagick-6.2.8.0-4.el5_5.3.i386.rpm
wget ftp://fr2.rpmfind.net/linux/centos/5.7/os/x86_64/CentOS/ImageMagick-6.2.8.0-4.el5_5.3.x86_64.rpm
wget ftp://fr2.rpmfind.net/linux/centos/5.7/os/x86_64/CentOS/ImageMagick-devel-6.2.8.0-4.el5_5.3.i386.rpm
wget ftp://fr2.rpmfind.net/linux/centos/5.7/os/x86_64/CentOS/ImageMagick-devel-6.2.8.0-4.el5_5.3.x86_64.rpm

yum erase ImageMagick

yum --nogpgcheck install \
ImageMagick-6.2.8.0-4.el5_5.3.i386.rpm \
ImageMagick-6.2.8.0-4.el5_5.3.x86_64.rpm \
ImageMagick-devel-6.2.8.0-4.el5_5.3.i386.rpm \
ImageMagick-devel-6.2.8.0-4.el5_5.3.x86_64.rpm
[/code]

The ImageMagick 'convert' command may not work with postscri

Posted: 2012/03/13 12:16:33
by pschaff
If those are official CentOS packages they should be signed so "--nogpgcheck" should not be required, nor should it be necessary to download the packages manually. This worked for me:

[code]yum --noplugins --enablerepo C5.7-base downgrade ImageMagick-6.2.8.0-4.el5_5.3 ImageMagick-devel-6.2.8.0-4.el5_5.3[/code]

The "--noplugins" is necessary for me because yum-priorities is installed and priorities are not defined for the repos in /etc/yum.repos.d/CentOS-Vault.repo.

Note also that [b]exclude=ImageMagick*[/b] should be added to the [base] and [updates] repos to avoid the downgraded versions from being overwritten by the later versions on the next "yum update".

Re: The ImageMagick 'convert' command may not work with postscript files

Posted: 2012/03/13 14:36:10
by jkhord
of course this just became very difficult to do because CentOS 5.7 just disappeared from all public mirrors overnight

Re: The ImageMagick 'convert' command may not work with postscript files

Posted: 2012/03/13 15:17:50
by pschaff
That's why my procedure above uses the CentOS-Vault repo.