MacOS 自带php环境安装imagick扩展

安装php扩展imagick
下载:wget https://pecl.php.net/get/imagick-3.4.3.tgz

解压:sudo tar -zxvf imagick-3.4.3

安装:
cd imagick-3.4.3
sudo /usr/bin/phpize    <--- 生成configure
sudo ./configure --with-php-config=/usr/bin/php-config --with-imagick=/usr/local/ImageMagick
sudo make
sudo make install
3、在php.ini中添加imagick扩展
参考踩坑记录2.

踩坑记录
1、未安装m4 和autoconf工具,会报错如下:

$ sudo /usr/bin/phpize
Configuring for:
PHP Api Version:         20160303
Zend Module Api No:      20160303
Zend Extension Api No:   320160303
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
解决办法:当然是安装m4、autoconf工具,推荐使用brew安装,这个网上教程很多,你当然会的啊。
brew install m4
brew install aut

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值