編譯過程當中,可能會遇到這樣的問題: MagickWand.h: No such file or directoryphp
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是已安裝,若是未安裝,安裝。ide
安裝完畢:export PKG_CONFIG_PATH=/usr/local/ImageMagick/lib/pkgconfig/ 紅色部分是p_w_picpathmagick的目標路徑this
再從新安裝imagick的php擴展。spa