Skip to content

PHP 安装 imagick 扩展

Published: at 00:00
OSX下安装 imagemagick
brew install imagemagick
下载
http://pecl.php.net/package/imagick
下载 stable 的,目前最新的 stable 版本是 3.1.2
wget http://pecl.php.net/get/imagick-3.1.2.tgz
解压,编译,安装
tar zxvf imagick-3.1.2.tgz

/opt/php/bin/phpize
/configure --with-php-config=/opt/php/bin/php-config

make -j 4
make test
sudo make install
配置
sudo vim /opt/php/lib/php.ini

extension_dir = "/opt/php/lib/php/extensions/no-debug-non-zts-20131226"

extension = imagick.so

查看
/opt/php/bin/php -m | grep imagick