首页PHP文章详情

Mac安装PHP扩展Imagick提示/usr/bin/MagickWand-config... Doesn't exist报错解决

By 封面恋人 / May 5, 2020 阅读 0 评论 0 发表于 PHP 字数:923 阅读时间:10秒

Imagick

摘要:checking ImageMagick MagickWand API configuration program... checking Testing /usr/local/bin/MagickWand-config... Doesn't exist

pecl install imagick 报错

  1. checking for pkg-config... /usr/local/bin/pkg-config
  2. checking ImageMagick MagickWand API configuration program... checking Testing /usr/local/bin/MagickWand-config... Doesn't exist
  3. checking Testing /usr/bin/MagickWand-config... Doesn't exist
  4. checking Testing /usr/sbin/bin/MagickWand-config... Doesn't exist
  5. checking Testing /opt/bin/MagickWand-config... Doesn't exist
  6. checking Testing /opt/local/bin/MagickWand-config... Doesn't exist
  7. configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.
  8. ERROR: `/private/tmp/pear/temp/imagick/configure --with-php-config=/usr/local/opt/php@7.2/bin/php-config --with-imagick' failed

解决步骤

首先安装ImageMagick

  1. brew install imagemagick

安装PHP扩展Imagick

  1. sudo pecl install imagick

检测Imagick是否安装成功

  1. $ php -m | grep imagick
  2. imagick

扩展学习

Imagick扩展下载

https://pecl.php.net/package/imagick

ImageMagick官方使用文档

https://www.php.net/manual/zh/book.imagick.php

结束语

Imagick一款超级好用的PHP图片处理扩展工具。提供丰富的图片操作处理API,特别适合小程序推广码生成,海报生成等场景.

手机扫码阅读,舒服~

⌘ + Return 发表
最新 最早 全部评论0 条评论