Imagick无法执行gs命令

Bra*_*iac 2 ghostscript imagick

我可以成功地将一些 pdf 文件转换为 png 文件,但有些会抛出此错误:

ImagickException:FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '- r144x144' -dFirstPage=1 -dLastPage=1 '-sOutputFile=/tmp/magick-966AGfRi74eBSiG%d' '-f/tmp/magick-966t0bB45paDzcW' '-f/tmp/magick-966l4St1G1Jfh6b'' (-1) @ 错误/delegate.c/ExternalDelegateCommand/462

我很难继续前进,因为我对错误消息一无所知。

可能是什么问题?

Ign*_*cio 5

我在使用 Ghostscript 9.26 版本的 Ubuntu 中遇到了同样的错误。另外安装ghostscript-x后apt-get update && apt-get install -y ghostscript-x问题就解决了。