无法在ImageMagick中安装GhostScript [英] Can't install GhostScript in ImageMagick

查看:912
本文介绍了无法在ImageMagick中安装GhostScript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下载ImageMagick的最新版本。打开包装。像这样安装Ghostscript:

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

$ sudo apt-get install ghostscript

之后尝试配置ImageMagick:

After that try to configure ImageMagick:

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

之后我尝试将PDF转换为jpg

After that i try to conver PDF to jpg

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

我看到了这个错误

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.

我做错了什么?

推荐答案

尝试以下转换命令,以更准确地查看可能出现的问题:

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

stderr可能会有很多输出。在这些行中你可能会看到IM正在寻找Ghostscript。另外,尝试

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)'

查找ImageMagick尝试的确切命令行运行Ghostscript(它可以调用 gsx 而不是 gs ,或者它可以在在/ usr / local / bin目录/ ...)。如果您发现与真实Ghostscript安装有任何偏差,可以通过编辑 delegates.xml 来修复它。

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

将显示ImageMagick的配置方式(例如,如果 gs 在编译时在 DELEGATES 变量的列表中。在这里您还可以找到在哪里查找 delegates.xml

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

应该列出这个(以及更多)* .xml设置文件所在的目录位于哪个控制如何转换等。表现......

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

这篇关于无法在ImageMagick中安装GhostScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆