想象一下狮子的安装问题

时间:2011-11-24 19:49:27

标签: php mamp imagick magickwand

目前我在使用MAMP在mac lion上正确安装imagick时遇到问题。

我已成功安装ImageMagick-6.7.3。我已经测试了命令行上的调用。注意:ImageMagick-6.7.3的bin文件夹有Magick-config,MagickWand-config和Wand-config

我正在尝试安装imagick-3.2.0RC1,它“为ImageMagick库提供了一个包装器”。但是,这就是我遇到问题的地方。如果没有安装,我的php脚本将不会执行,也不会知道如何使用Imagick。

我试过了 1)sudo pecl install magick

输出:

downloading imagick-3.0.1.tgz ...
Starting to download imagick-3.0.1.tgz (93,920 bytes)
.....................done: 93,920 bytes
13 source files, building
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
Please provide the prefix of Imagemagick installation [autodetect] : 
building in /private/tmp/pear/temp/pear-build-rootEzaTTE/imagick-3.0.1
running: /private/tmp/pear/temp/imagick/configure --with-imagick
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i386-apple-darwin11.2.0
checking host system type... i386-apple-darwin11.2.0
checking target system type... i386-apple-darwin11.2.0
checking for PHP prefix... /usr
checking for PHP includes... -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
checking for PHP extension directory... /usr/lib/php/extensions/no-debug-non-zts-20090626
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable the imagick extension... yes, shared
checking whether to enable the imagick GraphicsMagick backend... no
checking ImageMagick MagickWand API configuration program... configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.
ERROR: `/private/tmp/pear/temp/imagick/configure --with-imagick' failed

如您所见,它抱怨没有找到MagickWand-config。

但是,我很确定MagickWand-config的路径是正确的。我打开了一个终端并输入了

acBook-Pro:imagick-3.1.0RC1 $ Wand-config --version
6.7.3 Q16 

如果没有设置环境路径则应该从未有效。

我还打印出$ PATH:

-bash: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Applications/MAMP/Library/bin:/Users/darewreck/Downloads/MAMP_components_2.0.2/mysql-5.5.9/include:/Applications/ImageMagick-6.7.3/bin:/usr/X11/bin: No such file or directory

更新: 我安装了自制软件,并且能够执行以下操作:

brew install imagemagick

这让我成功地称之为“pecl install imagick”。

我接下来的问题是当我打电话给make:

-MacBook-Pro:imagick-2.2.2 darewreck$ make
/bin/sh /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/libtool --mode=compile cc  -I. -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -DPHP_ATOM_INC -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/include -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/main -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -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 -I/usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick  -DHAVE_CONFIG_H  -g -O2   -c /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c -o imagick_class.lo 
mkdir .libs
 cc -I. -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -DPHP_ATOM_INC -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/include -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/main -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -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 -I/usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c  -fno-common -DPIC -o .libs/imagick_class.o
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_getimagematte’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:262: warning: ‘MagickGetImageMatte’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:82)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_paintfloodfillimage’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:1035: warning: ‘MagickPaintFloodfillImage’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:101)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:1038: warning: ‘MagickPaintFloodfillImage’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:101)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_clippathimage’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:2319: warning: ‘MagickClipPathImage’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:74)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_colorfloodfillimage’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:2382: warning: ‘MagickColorFloodfillImage’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:77)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_mapimage’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:2772: warning: ‘MagickMapImage’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:87)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_mattefloodfillimage’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:2805: warning: ‘MagickMatteFloodfillImage’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:90)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_medianfilterimage’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:2832: warning: ‘MagickMedianFilterImage’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/magick-image.h:212)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_paintopaqueimage’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:2895: warning: ‘MagickPaintOpaqueImageChannel’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:106)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_painttransparentimage’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:2954: warning: ‘MagickPaintTransparentImage’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:108)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_reducenoiseimage’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:3097: warning: ‘MagickReduceNoiseImage’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/magick-image.h:260)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_getimageattribute’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:4080: warning: ‘MagickGetImageAttribute’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:60)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_getimagechannelextrema’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:4253: warning: ‘MagickGetImageChannelExtrema’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:79)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_getimageextrema’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:4482: warning: ‘MagickGetImageExtrema’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:81)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_getimageindex’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:5196: warning: ‘MagickGetImageIndex’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:65)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_setimageindex’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:5221: warning: ‘MagickSetImageIndex’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:114)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_getimagesize’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:5291: warning: ‘MagickGetImageSize’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:140)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_setimageattribute’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:5599: warning: ‘MagickSetImageAttribute’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:112)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_flattenimages’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:5839: warning: ‘MagickFlattenImages’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:132)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_averageimages’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:6859: warning: ‘MagickAverageImages’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:131)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c: In function ‘zim_imagick_mosaicimages’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_class.c:7283: warning: ‘MagickMosaicImages’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:135)
/bin/sh /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/libtool --mode=compile cc  -I. -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -DPHP_ATOM_INC -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/include -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/main -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -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 -I/usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick  -DHAVE_CONFIG_H  -g -O2   -c /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagickdraw_class.c -o imagickdraw_class.lo 
 cc -I. -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -DPHP_ATOM_INC -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/include -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/main -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -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 -I/usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagickdraw_class.c  -fno-common -DPIC -o .libs/imagickdraw_class.o
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagickdraw_class.c: In function ‘zim_imagickdraw_setfillalpha’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagickdraw_class.c:253: warning: ‘DrawSetFillAlpha’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:167)
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagickdraw_class.c: In function ‘zim_imagickdraw_setstrokealpha’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagickdraw_class.c:313: warning: ‘DrawSetStrokeAlpha’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick/wand/deprecate.h:168)
/bin/sh /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/libtool --mode=compile cc  -I. -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -DPHP_ATOM_INC -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/include -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/main -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -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 -I/usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick  -DHAVE_CONFIG_H  -g -O2   -c /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagickpixel_class.c -o imagickpixel_class.lo 
 cc -I. -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -DPHP_ATOM_INC -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/include -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/main -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -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 -I/usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagickpixel_class.c  -fno-common -DPIC -o .libs/imagickpixel_class.o
/bin/sh /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/libtool --mode=compile cc  -I. -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -DPHP_ATOM_INC -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/include -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/main -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -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 -I/usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick  -DHAVE_CONFIG_H  -g -O2   -c /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagickpixeliterator_class.c -o imagickpixeliterator_class.lo 
 cc -I. -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -DPHP_ATOM_INC -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/include -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/main -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -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 -I/usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagickpixeliterator_class.c  -fno-common -DPIC -o .libs/imagickpixeliterator_class.o
/bin/sh /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/libtool --mode=compile cc  -I. -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -DPHP_ATOM_INC -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/include -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/main -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -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 -I/usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick  -DHAVE_CONFIG_H  -g -O2   -c /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_helpers.c -o imagick_helpers.lo 
 cc -I. -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -DPHP_ATOM_INC -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/include -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/main -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -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 -I/usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_helpers.c  -fno-common -DPIC -o .libs/imagick_helpers.o
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_helpers.c: In function ‘php_imagick_progress_monitor’:
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_helpers.c:44: warning: format ‘%ld’ expects type ‘long int’, but argument 4 has type ‘MagickOffsetType’
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_helpers.c:44: warning: format ‘%ld’ expects type ‘long int’, but argument 5 has type ‘MagickSizeType’
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_helpers.c:44: warning: format ‘%ld’ expects type ‘long int’, but argument 4 has type ‘MagickOffsetType’
/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick_helpers.c:44: warning: format ‘%ld’ expects type ‘long int’, but argument 5 has type ‘MagickSizeType’
/bin/sh /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/libtool --mode=compile cc  -I. -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -DPHP_ATOM_INC -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/include -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/main -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -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 -I/usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick  -DHAVE_CONFIG_H  -g -O2   -c /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick.c -o imagick.lo 
 cc -I. -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -DPHP_ATOM_INC -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/include -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/main -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -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 -I/usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/imagick.c  -fno-common -DPIC -o .libs/imagick.o
/bin/sh /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/libtool --mode=link cc -DPHP_ATOM_INC -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/include -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/main -I/Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2 -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 -I/usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick  -DHAVE_CONFIG_H  -g -O2   -o imagick.la -export-dynamic -avoid-version -prefer-pic -module -rpath /Users/darewreck/Downloads/imagick-2.2.2/imagick-2.2.2/modules  imagick_class.lo imagickdraw_class.lo imagickpixel_class.lo imagickpixeliterator_class.lo imagick_helpers.lo imagick.lo -Wl,-rpath,/usr/local/Cellar/imagemagick/6.7.1-1/lib -L/usr/local/Cellar/imagemagick/6.7.1-1/lib -lMagickWand -Wl,-rpath,/usr/local/Cellar/imagemagick/6.7.1-1/lib -L/usr/local/Cellar/imagemagick/6.7.1-1/lib -lMagickCore
cc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/imagick.so -bundle  .libs/imagick_class.o .libs/imagickdraw_class.o .libs/imagickpixel_class.o .libs/imagickpixeliterator_class.o .libs/imagick_helpers.o .libs/imagick.o  -L/usr/local/Cellar/imagemagick/6.7.1-1/lib /usr/local/Cellar/imagemagick/6.7.1-1/lib/libMagickWand.dylib -L/usr/X11/lib /usr/local/Cellar/imagemagick/6.7.1-1/lib/libMagickCore.dylib  -Wl,-rpath -Wl,/usr/local/Cellar/imagemagick/6.7.1-1/lib -Wl,-rpath -Wl,/usr/local/Cellar/imagemagick/6.7.1-1/lib
ld: file not found: /usr/local/lib/liblcms.1.0.19.dylib for architecture x86_64
collect2: ld returned 1 exit status
make: *** [imagick.la] Error 1

我读了一些线程说我的版本可能有bug,所以我尝试构建imagick-2.2.2但仍然没有。

任何建议赞赏。 谢谢, d

5 个答案:

答案 0 :(得分:10)

使用它来确定wad二进制文件的位置(通常是/ opt / local /):

$ which Wand-config
/opt/local/bin/Wand-config

安装imagick:

$ sudo pecl install imagick

当提示您输入Imagemagick路径时,请提供您返回的结果作为Wand-config的路径,不带 bin /

Please provide the prefix of Imagemagick installation [autodetect] : /opt/local/

确保添加

extension=imagick.so

到你的php.ini

答案 1 :(得分:2)

我遇到了同样的问题,最终也找到了解决办法。缺点是你需要以下命令(我使用的是macports,顺便说一句):

# sudo ln -s /usr/local/bin `which MagickWand-config`
# sudo ln -s /opt/local/include/ImageMagick-6 /opt/local/include/ImageMagick

在那之后,一个简单的“ sudo pecl install imagick ”为我工作。

这些更改的原因是,查看 imagick 包的 .configure 文件中的代码,它会查找 MagickWand-config / strong / / usr / bin 和 / usr / local / bin 文件夹中的二进制文件。此外,它会在 / opt / local / include / ImageMagick 文件夹中查找头文件,但MacPorts会在 / opt / local / include / ImageMagick上安装最近版本的ImageMagick的头文件-6

查看您的问题描述,我不确定php包含文件是从正确的位置获取的。这是一个完全不同的问题,但为了确保您拥有正确的php包含文件,您应该执行以下操作:

  1. http://www.php.net/get/php-5.X.X.tar.bz2/from/a/mirror下载适当版本的php的源文件。对于MAMP支持的最新版本的php5.3(在撰写本文时为5.3.20),请使用: http://www.php.net/get/php-5.3.20.tar.bz2/from/a/mirror

  2. /Applications/MAMP/bin/php/php5.X.X 文件夹中创建名为 include 的文件夹。在我们的例子中:

    sudo mkdir -p /Applications/MAMP/bin/php/php5.3.20/include

  3. 将php源代码解压缩到新的 include 文件夹中。在我们的例子中:

    cd /Applications/MAMP/bin/php/php5.3.20/include

    sudo tar -jvxf~ / Downloads / php-5.3.20.tar.bz2

  4. 将php文件夹从 php-5.x.x 重命名为 php 。如此:

    sudo mv php {-5.3.20,}

  5. 确保在OSX之前调用MAMP的php。有几种方法可以实现这一目标。适用于每个配置文件的简单方法是编辑 / etc / paths 文件,并确保像 /Applications/MAMP/bin/php/php5.xx/bin 在 / usr / local / bin 行之前。就我而言,该文件如下所示:

    / opt / local / bin

    的/ opt / local / sbin中

    /Applications/MAMP/bin/php/php5.3.20/bin

    的/ usr / local / bin中

    的/ usr / bin中

    / bin中

    / usr / sbin目录

    / sbin目录

  6. 进入php文件夹并运行 ./ configure 。如此:

    cd php

    <强> ./配置

  7. 更改 / etc / paths 文件后,您需要关闭并重新打开终端以获取要应用的新设置。

答案 2 :(得分:1)

如果一切都失败并且您通常安装与cli相关的东西,您可能需要考虑使用自制软件,这对于这类东西非常有用并适用于大多数人。查看其主页https://github.com/mxcl/homebrew

Homebrew是新的macports,这是新的fink。我强烈推荐使用它。你甚至可以用它来安装mysql,php和apache。

答案 3 :(得分:1)

以下帖子帮助我解决了我在MAMP 2和Lion http://thoomtech.com/post/8832473042/mamp-imagemagick-lion上使用PECL安装imagick的问题。请务必阅读有关使用MAMP中包含的PECL安装程序的帖子的第1部分。这是直截了当的,对我来说效果很好。

答案 4 :(得分:1)

对于那些有问题的人,请在此处阅读我的帖子:

http://delboy1978uk.wordpress.com/2013/04/29/install-imagemagick-and-imagick-on-mac-os-x-lion/

如果您使用的是PHP 5.4,您还需要设置为beta并返回之前和之后,如下所示:

sudo pear config-set preferred_state beta

sudo pecl install imagick

sudo pear config-set preferred_state stable