ImageMagick 无法安装

ImageMagick 无法安装

我的 Ubuntu 没有 ImageMagick。我尝试按照以下说明从终端安装它:回答。但是当我输入命令时它给了我错误sudo apt-get install imagemagick php5-imagick。错误是

xinru@xinru-Alienware-13-R2:~$ sudo apt-get install imagemagick php5-imagick
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package php5-imagick is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php5-imagick' has no installation candidate

有人能帮我解决这个问题吗?谢谢!

答案1

在 Ubuntu 16.04 中,默认的 PHP 版本是 7.x。软件包php5-imagick适用于 PHP 版本 5.x。正确的软件包是php-imagick。因此您必须:

sudo apt install imagemagick php-imagick

相关内容