apt install -y imagemagick libmagickwand-dev
wget https://pecl.php.net/get/imagick-3.7.0.tgz
tar -xzvf imagick-3.7.0.tgz
cd imagick-3.7.0/
/usr/local/lsws/lsphp8/bin/phpize
./configure --with-php-config=/usr/local/lsws/lsphp8/bin/php-config
make && make install
nano /usr/local/lsws/lsphp8/lib/php.ini
最后加一行
extension = /path/imagick.so
重启php,就可以了。
发表回复