ubuntu安装imagick扩展

注意:安装该扩展不要求安装ImageMagick
从http://pecl.php.net/package/imagick找到imagick的最新的版本

Linux代码  

wget http://pecl.php.net/get/imagick-3.4.3.tgz  

tar -xzvf imagick-3.4.3.tgz  

/usr/bin/phpize  

./configure --with-php-config=/usr/bin/php-config 

make  && make install  

但是出现一个奇怪的错误

checking ImageMagick MagickWand API configuration program... configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.
ERROR: `/tmp/pear/temp/imagick/configure --with-imagick' failed 

sudo apt-get install libmagickwand-dev libmagickcore-dev
 

即可安装ImageMagick-devel。

然后再运行

pecl install imagick

安装就顺利了,最后别忘记在你的php.ini中加上

extension=imagick.so

posted @ 2017-05-16 14:53  spectrelb  阅读(1739)  评论(0编辑  收藏  举报