编译过程中,可能会遇到这样的问题: MagickWand.h: No such file or directory

root/soft/imagick-3.1.0RC2/imagick_file.c: In function ‘php_imagick_write_file’:
/root/soft/imagick-3.1.0RC2/imagick_file.c:247: error: ‘MagickBooleanType’ undeclared (first use in this function)
/root/soft/imagick-3.1.0RC2/imagick_file.c:247: error: expected ‘;’ before ‘status’
/root/soft/imagick-3.1.0RC2/imagick_file.c:258: error: ‘status’ undeclared (first use in this function)
/root/soft/imagick-3.1.0RC2/imagick_file.c:258: error: ‘php_imagick_object’ has no member named ‘magick_wand’
/root/soft/imagick-3.1.0RC2/imagick_file.c:260: error: ‘php_imagick_object’ has no member named ‘magick_wand’
/root/soft/imagick-3.1.0RC2/imagick_file.c:264: error: ‘MagickFalse’ undeclared (first use in this function)
/root/soft/imagick-3.1.0RC2/imagick_file.c: In function ‘php_imagick_stream_handler’:
/root/soft/imagick-3.1.0RC2/imagick_file.c:277: error: ‘MagickBooleanType’ undeclared (first use in this function)
/root/soft/imagick-3.1.0RC2/imagick_file.c:277: error: expected ‘;’ before ‘status’
/root/soft/imagick-3.1.0RC2/imagick_file.c:306: error: ‘status’ undeclared (first use in this function)
/root/soft/imagick-3.1.0RC2/imagick_file.c:306: error: ‘php_imagick_object’ has no member named ‘magick_wand’
/root/soft/imagick-3.1.0RC2/imagick_file.c:310: error: ‘php_imagick_object’ has no member named ‘magick_wand’
/root/soft/imagick-3.1.0RC2/imagick_file.c:314: error: ‘php_imagick_object’ has no member named ‘magick_wand’
/root/soft/imagick-3.1.0RC2/imagick_file.c:318: error: ‘php_imagick_object’ has no member named ‘magick_wand’
/root/soft/imagick-3.1.0RC2/imagick_file.c:326: error: ‘MagickFalse’ undeclared (first use in this function)
make: *** [imagick_file.lo] Error 1


首先确保pkg-config是已安装,如果未安装,安装。

安装完毕:export PKG_CONFIG_PATH=/usr/local/ImageMagick/lib/pkgconfig/  红色部分是p_w_picpathmagick的目标路径

再重新安装imagick的php扩展。