PHP Imagick FailedToExecuteCommand gs

问题描述 投票:0回答:1

当我想将pdf页面转换为jpg时,此问题阻止了我

ImagickException: FailedToExecuteCommand 'gs'

如何解决此问题?

我的代码:

        $im = new imagick();
        $im->setResolution(300, 300);
        $im->readImage($pdfPath);
php laravel imagick
1个回答
0
投票

您需要安装幽灵脚本,这是缺少的依赖项。此安装应该可以解决问题。

sudo apt-get update
sudo apt-get install ghostscript-x
© www.soinside.com 2019 - 2024. All rights reserved.