如何在MAMP上安装imagick?

时间:2017-03-21 14:41:56

标签: php macos mamp imagick pecl

当我运行sudo pecl install imagick时,收到以下错误:

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/install/imagick/configure --with-php-config=/usr/bin/php-config --with-imagick' failed

不确定此错误是什么意思。有什么想法吗?

2 个答案:

答案 0 :(得分:3)

您需要先安装imagemagick:

使用自制软件:

brew install imagemagick
使用macports

sudo port install imagemagick

然后你可以安装php包:

sudo pecl install imagick

答案 1 :(得分:2)

您需要libmagickwand-dev才能使用pecl安装扩展程序。