5

Currently i'm having issues with installing imagick correctly on the mac lion with MAMP.

I have ImageMagick-6.7.3 successfully installed. I've tested out the calls on command line. Note: The bin folder of the ImageMagick-6.7.3 has Magick-config, MagickWand-config, and Wand-config

I'm trying to install imagick-3.2.0RC1 which "Provides a wrapper to the ImageMagick library." However, this is where I have the problem. Without this installed, My php script won't execute and won't' know what how to use Imagick is.

I've tried 1) sudo pecl install magick

output:

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

As you can see, it complains about not finding the MagickWand-config.

However, I'm pretty sure the path to the MagickWand-config is correct. I opened a terminal and typed

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

If it wasn't set the the environmental path then that should have never worked.

I also printed out the $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

Update: I installed homebrew and was able to do the following:

brew install imagemagick

This allowed me to call "pecl install imagick" successfully.

The issue i get next is when i call 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

I read some thread saying the the version I have might have bugs, so i tried building imagick-2.2.2 and still no go.

Any advice Appreciated. Thanks, D

4

5 回答 5

11

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

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

安装想象:

$ sudo pecl install imagick

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

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

确保添加

extension=imagick.so

到你的 php.ini

于 2013-04-22T18:15:56.773 回答
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文件中的代码,它会在/usr/bin/usr/local/bin文件夹中查找 MagickWand -config二进制文件。此外,它会在/opt/local/include/ImageMagick文件夹中查找头文件,但 MacPorts 会在/opt/local/include/ImageMagick-6上安装 ImageMagick 最新版本的头文件。

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

  1. 从http://www.php.net/get/php-5.XXtar.bz2/from/a/mirror下载正确版本的 php 的源文件。对于 MAMP 支持的 php5.3 的最新版本(撰写本文时为 5.3.20),请使用:http ://www.php.net/get/php-5.3.20.tar.bz2/from/一面镜子

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

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

  3. 将 php 源代码解压到新的包含文件夹中。在我们的示例中:

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

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

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

    须藤 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

    /垃圾桶

    /usr/sbin

    /sbin

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

    光盘

    。/配置

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

于 2013-08-21T16:24:16.943 回答
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
于 2013-08-15T15:57:32.630 回答
1

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

Homebrew 是新的 macports,它是新的 fink。我强烈推荐使用它。您甚至可以将它用于 mysql、php 和 apache 安装。

于 2011-11-24T20:00:19.367 回答
1

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

于 2011-11-27T14:44:40.010 回答