How to install imagick on PHP7 and Debian?

拟墨画扇 提交于 2021-01-28 21:52:55

问题


I need to install Imagick, but I've php7 and debian. I tried to do this :

apt-get install php-imagick

But I've this error :

Unable to locate package php-imagick

I also tried to do this

apt-get install php5-imagick

But O think this command is to php5, an dnow I've in /etc/php5/mods-available/ un imagick.ini

So is imagick is install for php7?


回答1:


It seems Imagick is not yet released for PHP7 on Debian stable.




回答2:


Debian Buster and PHP7.3

sudo apt-get install -y libmagickwand-dev 
sudo apt-get install -y imagemagick
pecl install imagick

if you don't have pecl you could try to install it with

sudo apt-get install -y php-pear

or

sudo apt-get install -y pear

if above ways fail, you can alternatively download it from web and use php to install it:

wget -O ./go-pear.php http://pear.php.net/go-pear
php ./go-pear.php
rm ./go-pear.php


来源:https://stackoverflow.com/questions/40783986/how-to-install-imagick-on-php7-and-debian

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