“pecl install imagick”在山狮上失败了。找不到“魔杖/ MagickWand.h”

时间:2013-05-23 20:43:01

标签: imagemagick osx-mountain-lion imagick

听起来很像。我做了:

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时遇到问题的无数次。似乎他们一直在这里和那里改变一些小事(例如,我之前从未听说过“魔术师”)。

1 个答案:

答案 0 :(得分: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