1

听起来差不多。我做了:

brew install imagemagick

这似乎进展顺利——所以问题不在于 imagemagick 本身。然后我尝试安装 PHP 扩展(在尝试之前更新 pear 和 pecl):

pecl install imagick

它失败。这是接近尾声的情况:

running: make
/bin/sh /private/tmp/pear/install/pear-build-brad.garrettZppuRq/imagick-3.0.1/libtool --mode=compile cc  -I. -I/private/tmp/pear/install/imagick -DPHP_ATOM_INC -I/private/tmp/pear/install/pear-build-brad.garrettZppuRq/imagick-3.0.1/include -I/private/tmp/pear/install/pear-build-brad.garrettZppuRq/imagick-3.0.1/main -I/private/tmp/pear/install/imagick -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/pear/install/imagick/imagick_class.c -o imagick_class.lo
mkdir .libs
 cc -I. -I/private/tmp/pear/install/imagick -DPHP_ATOM_INC -I/private/tmp/pear/install/pear-build-brad.garrettZppuRq/imagick-3.0.1/include -I/private/tmp/pear/install/pear-build-brad.garrettZppuRq/imagick-3.0.1/main -I/private/tmp/pear/install/imagick -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/install/imagick/imagick_class.c  -fno-common -DPIC -o .libs/imagick_class.o
In file included from /private/tmp/pear/install/imagick/imagick_class.c:21:
/private/tmp/pear/install/imagick/php_imagick.h:49:12: fatal error: 'wand/MagickWand.h' file not found
#  include <wand/MagickWand.h>
           ^
1 error generated.
make: *** [imagick_class.lo] Error 1
ERROR: `make' failed

有任何想法吗??这只是我在计算机上安装 imagemagick 时遇到的无数次问题。似乎他们一直在这里和那里改变一些小东西(例如,我以前从未听说过“magickwand”)。

4

1 回答 1

4

我根据http://www.imagemagick.org/script/install-source.php#unix编译了 ImageMagick

然后我跟着http://verysimple.com/2011/12/21/install-image-magick-for-php-on-osx/

出现以下错误fatal error: 'wand/MagickWand.h' file not found

然后我找到了http://www.imagemagick.org/discourse-server/viewtopic.php?f=10&t=22644

必须在 config.m4 中找到解决方案,它正在导出 pkgconfig:

export PKG_CONFIG_PATH="`MagickWand-config --prefix`/lib/pkgconfig/"

然后我配置了以下内容:

LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" ./configure --with-imagick=/usr/local
于 2013-06-03T10:46:48.510 回答