Eduard Grinchenko
Eduard Grinchenko

Reputation: 524

Can't install GhostScript in ImageMagick

Download latest version of ImageMagick. Unpacked it. Installing Ghostscript like this:

$ sudo apt-get install ghostscript

After that try to configure ImageMagick:

$ ./configure --with-gslib
$ make
$ make install

After that i try to conver PDF to jpg

$ sudo /usr/local/bin/convert in.pdf out.jpg

And i see this mistake

convert: no decode delegate for this image format `/tmp/magick-BzHdr4Kp-00000001' @ error/constitute.c/ReadImage/544.
convert: Postscript delegate failed `in.PDF': Нет такого файла или каталога @ error/pdf.c/ReadPDFImage/678.
convert: no images defined `out.jpg' @ error/convert.c/ConvertImageCommand/3044.

What i'm doing wrong?

Upvotes: 2

Views: 6221

Answers (1)

Kurt Pfeifle
Kurt Pfeifle

Reputation: 90243

Try the following convert commands to see more precisely what's possibly going wrong:

 convert a.pdf -debug coder a.jpg
 convert a.pdf -debug all   a.jpg

There will possibly be a lot of output going to stderr. Amongst the lines you may see where IM is looking for Ghostscript. Also, try

 convert -list delegate 
 convert -list delegate | grep --color -E '(eps|pdf)'

to find with which exact commandlines ImageMagick tries to run Ghostscript (it may call gsx instead of gs, or it may look for it in /usr/local/bin/...). If you find any deviations from your real Ghostscript installation, you can possibly fix it by editing delegates.xml.

 convert -list configure

will show you how ImageMagick is configured (and if, for example, gs was during compile-time in the list in DELEGATES variables). Here you also find where to look for delegates.xml:

 convert -list configure | grep CONFIGURE_PATH

should list the directory where this (as well as some more) *.xml settings files are located which control how convert et al. behave...

Upvotes: 4

Related Questions