原Mac安装PHP扩展Imagick提示/usr/bin/MagickWand-config... Doesn't exist报错解决
摘要:checking ImageMagick MagickWand API configuration program... checking Testing /usr/local/bin/MagickWand-config... Doesn't exist
pecl install imagick 报错
checking for pkg-config... /usr/local/bin/pkg-config
checking ImageMagick MagickWand API configuration program... checking Testing /usr/local/bin/MagickWand-config... Doesn't exist
checking Testing /usr/bin/MagickWand-config... Doesn't exist
checking Testing /usr/sbin/bin/MagickWand-config... Doesn't exist
checking Testing /opt/bin/MagickWand-config... Doesn't exist
checking Testing /opt/local/bin/MagickWand-config... Doesn't exist
configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.
ERROR: `/private/tmp/pear/temp/imagick/configure --with-php-config=/usr/local/opt/php@7.2/bin/php-config --with-imagick' failed
解决步骤
首先安装ImageMagick
brew install imagemagick
安装PHP扩展Imagick
sudo pecl install imagick
检测Imagick是否安装成功
$ php -m | grep imagick
imagick
扩展学习
Imagick扩展下载
https://pecl.php.net/package/imagick
ImageMagick官方使用文档
https://www.php.net/manual/zh/book.imagick.php
结束语
Imagick一款超级好用的PHP图片处理扩展工具。提供丰富的图片操作处理API,特别适合小程序推广码生成,海报生成等场景.
手机扫码阅读,舒服~