"pecl install imagick"在山狮上失败.找不到"wand/MagickWand.h"; [英] "pecl install imagick" fails on mountain lion. can't find "wand/MagickWand.h"
问题描述
听起来差不多.我做到了:
Pretty much what it sounds like. I did:
brew install imagemagick
这似乎进展顺利-因此问题不在于imagemagick本身. 然后,我尝试安装PHP扩展(尝试之前更新pear和pecl):
That seemed to go well--so the problem is not with imagemagick itself. I then tried to install the PHP extension (updating pear and pecl before trying):
pecl install imagick
失败.这是快要结束了:
It fails. Here's what happens near the end:
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
有什么想法吗?这仅是我第11次在计算机上安装imagemagick时遇到问题.似乎他们一直在这里和那里改变很小的事情(例如,我之前从未听说过"magickwand").
Any ideas?? This is only the umpteenth time I've had issues installing imagemagick on a computer. Seems they change little things here and there all the time (for instance, I've never heard of "magickwand" before now).
推荐答案
我根据然后我关注了 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:
Had to find the solution in config.m4, it was exporting pkgconfig:
export PKG_CONFIG_PATH="`MagickWand-config --prefix`/lib/pkgconfig/"
然后我配置了以下内容:
Then I configured with the following:
LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" ./configure --with-imagick=/usr/local
这篇关于"pecl install imagick"在山狮上失败.找不到"wand/MagickWand.h";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!