Can't install GhostScript in ImageMagick

随声附和 提交于 2020-01-02 10:04:43

问题


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?


回答1:


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...



来源:https://stackoverflow.com/questions/11413249/cant-install-ghostscript-in-imagemagick

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!