2013-04-03 76 views
1

正如我剛纔安裝的ImageMagick 6.8.1 Q16到我們的CentOS 6.3系統Imagick安裝問題PHP:5.3.3&ImageMagick的:6.8.1 Q16

請注意,我是我在安裝Imagick問題運行的所有命令對應的根

然後我嘗試以下操作:PECL安裝imagick和下面的錯誤出現(完全錯誤):

[[email protected] /]# pecl install imagick 
downloading imagick-3.1.0RC2.tgz ... 
Starting to download imagick-3.1.0RC2.tgz (93,264 bytes) 
.....................done: 93,264 bytes 
15 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 /tmp/pear/install/pear-build-rootPvQgOJ/imagick-3.1.0RC2 
running: /tmp/pear/install/imagick/configure --with-imagick 
checking for grep that handles long lines and -e... /bin/grep 
checking for egrep... /bin/grep -E 
checking for a sed that does not truncate output... /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... x86_64-unknown-linux-gnu 
checking host system type... x86_64-unknown-linux-gnu 
checking target system type... x86_64-unknown-linux-gnu 
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/lib64/php/modules 
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... gawk 
checking whether to enable the imagick extension... yes, shared 
checking whether to enable the imagick GraphicsMagick backend... no 
checking ImageMagick MagickWand API configuration program... found in /usr/local/bin/MagickWand- 
config 
checking if ImageMagick version is at least 6.2.4... found version 6.8.1 Q16 
checking for MagickWand.h header file... found in /usr/local/include/ImageMagick 
/wand/MagickWand.h 
checking PHP version is at least 5.1.3... yes. found 5.3.3 
Package MagickWand was not found in the pkg-config search path. 
Perhaps you should add the directory containing `MagickWand.pc' 
to the PKG_CONFIG_PATH environment variable 
No package 'MagickWand' found 
Package MagickWand was not found in the pkg-config search path. 
Perhaps you should add the directory containing `MagickWand.pc' 
to the PKG_CONFIG_PATH environment variable 
No package 'MagickWand' found 
checking for a sed that does not truncate output... (cached) /bin/sed 
checking for fgrep... /bin/grep -F 
checking for ld used by cc... /usr/bin/ld 
checking if the linker (/usr/bin/ld) is GNU ld... yes 
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B 
checking the name lister (/usr/bin/nm -B) interface... BSD nm 
checking whether ln -s works... yes 
checking the maximum length of command line arguments... 1966080 
checking whether the shell understands some XSI constructs... yes 
checking whether the shell understands "+="... yes 
checking for /usr/bin/ld option to reload object files... -r 
checking for objdump... objdump 
checking how to recognize dependent libraries... pass_all 
checking for ar... ar 
checking for strip... strip 
checking for ranlib... ranlib 
checking command to parse /usr/bin/nm -B output from cc object... ok 
checking for ANSI C header files... yes 
checking for sys/types.h... yes 
checking for sys/stat.h... yes 
checking for stdlib.h... yes 
checking for memory.h... yes 
checking for strings.h... yes 
checking for inttypes.h... yes 
checking for stdint.h... yes 
checking for unistd.h... yes 
checking for dlfcn.h... yes 
checking for objdir... .libs 
checking if cc supports -fno-rtti -fno-exceptions... no 
checking for cc option to produce PIC... -fPIC -DPIC 
checking if cc PIC flag -fPIC -DPIC works... yes 
checking if cc static flag -static works... no 
checking if cc supports -c -o file.o... yes 
checking if cc supports -c -o file.o... (cached) yes 
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes 
checking whether -lc should be explicitly linked in... no 
checking dynamic linker characteristics... GNU/Linux ld.so 
checking how to hardcode library paths into programs... immediate 
checking whether stripping libraries is possible... yes 
checking if libtool supports shared libraries... yes 
checking whether to build shared libraries... yes 
checking whether to build static libraries... no 
configure: creating ./config.status 
config.status: creating config.h 
config.status: executing libtool commands 
running: make 
/bin/sh /tmp/pear/install/pear-build-rootPvQgOJ/imagick-3.1.0RC2/libtool --mode=compile cc -I. 
-I/tmp/pear/install/imagick -DPHP_ATOM_INC -I/tmp/pear/install/pear-build-rootPvQgOJ/imagick- 
3.1.0RC2/include -I/tmp/pear/install/pear-build-rootPvQgOJ/imagick-3.1.0RC2/main -I/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 /tmp/pear/install/imagick/imagick_file.c -o imagick_file.lo 
libtool: compile: cc -I. -I/tmp/pear/install/imagick -DPHP_ATOM_INC -I/tmp/pear/install/pear- 
build-rootPvQgOJ/imagick-3.1.0RC2/include -I/tmp/pear/install/pear-build-rootPvQgOJ/imagick- 
3.1.0RC2/main -I/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 /tmp/pear/install/imagick/imagick_file.c -fPIC -DPIC -o 
.libs/imagick_file.o 
In file included from /tmp/pear/install/imagick/imagick_file.c:21: 
/tmp/pear/install/imagick/php_imagick.h:49:31: error: wand/MagickWand.h: No such file or 
directory 
In file included from /tmp/pear/install/imagick/php_imagick_file.h:24, 
      from /tmp/pear/install/imagick/imagick_file.c:22: 
/tmp/pear/install/imagick/php_imagick_defs.h:72: error: expected specifier-qualifier-list 
before âMagickWandâ 
/tmp/pear/install/imagick/php_imagick_defs.h:80: error: expected specifier-qualifier-list 
before âDrawingWandâ 
/tmp/pear/install/imagick/php_imagick_defs.h:86: error: expected specifier-qualifier-list 
before âPixelIteratorâ 
/tmp/pear/install/imagick/php_imagick_defs.h:98: error: expected specifier-qualifier-list 
before âPixelWandâ 
In file included from /tmp/pear/install/imagick/imagick_file.c:22: 
/tmp/pear/install/imagick/php_imagick_file.h:43: error: âMaxTextExtentâ undeclared here (not in 
a function) 
/tmp/pear/install/imagick/imagick_file.c: In function âphp_imagick_file_initâ: 
/tmp/pear/install/imagick/imagick_file.c:75: error: âMagickPathâ undeclared (first use in this 
function) 
/tmp/pear/install/imagick/imagick_file.c:75: error: (Each undeclared identifier is reported 
only once 
/tmp/pear/install/imagick/imagick_file.c:75: error: for each function it appears in.) 
/tmp/pear/install/imagick/imagick_file.c:99: error: âHeadPathâ undeclared (first use in this 
function) 
/tmp/pear/install/imagick/imagick_file.c:100: error: âTailPathâ undeclared (first use in this 
function) 
/tmp/pear/install/imagick/imagick_file.c: In function 
âphp_imagick_read_image_using_imagemagickâ: 
/tmp/pear/install/imagick/imagick_file.c:124: error: âphp_imagick_objectâ has no member named 
âmagick_wandâ 
/tmp/pear/install/imagick/imagick_file.c:124: error: âMagickFalseâ undeclared (first use in 
this function) 
/tmp/pear/install/imagick/imagick_file.c:128: error: âphp_imagick_objectâ has no member named 
âmagick_wandâ 
/tmp/pear/install/imagick/imagick_file.c:135: error: âphp_imagick_objectâ has no member named 
âmagick_wandâ 
/tmp/pear/install/imagick/imagick_file.c:137: error: âphp_imagick_objectâ has no member named 
âmagick_wandâ 
/tmp/pear/install/imagick/imagick_file.c: In function 
âphp_imagick_read_image_using_php_streamsâ: 
/tmp/pear/install/imagick/imagick_file.c:144: error: âMagickBooleanTypeâ undeclared (first use 
in this function) 
/tmp/pear/install/imagick/imagick_file.c:144: error: expected â;â before âstatusâ 
/tmp/pear/install/imagick/imagick_file.c:177: error: âstatusâ undeclared (first use in this 
function) 
/tmp/pear/install/imagick/imagick_file.c:177: error: âphp_imagick_objectâ has no member named 
âmagick_wandâ 
/tmp/pear/install/imagick/imagick_file.c:179: error: âphp_imagick_objectâ has no member named 
âmagick_wandâ 
/tmp/pear/install/imagick/imagick_file.c:184: error: âMagickFalseâ undeclared (first use in 
this function) 
/tmp/pear/install/imagick/imagick_file.c:189: error: âphp_imagick_objectâ has no member named 
âmagick_wandâ 
/tmp/pear/install/imagick/imagick_file.c:196: error: âphp_imagick_objectâ has no member named 
âmagick_wandâ 
/tmp/pear/install/imagick/imagick_file.c: In function âphp_imagick_write_fileâ: 
/tmp/pear/install/imagick/imagick_file.c:247: error: âMagickBooleanTypeâ undeclared (first use 
in this function) 
/tmp/pear/install/imagick/imagick_file.c:247: error: expected â;â before âstatusâ 
/tmp/pear/install/imagick/imagick_file.c:258: error: âstatusâ undeclared (first use in this 
function) 
/tmp/pear/install/imagick/imagick_file.c:258: error: âphp_imagick_objectâ has no member named 
âmagick_wandâ 
/tmp/pear/install/imagick/imagick_file.c:260: error: âphp_imagick_objectâ has no member named 
âmagick_wandâ 
/tmp/pear/install/imagick/imagick_file.c:264: error: âMagickFalseâ undeclared (first use in 
this function) 
/tmp/pear/install/imagick/imagick_file.c: In function âphp_imagick_stream_handlerâ: 
/tmp/pear/install/imagick/imagick_file.c:277: error: âMagickBooleanTypeâ undeclared (first use 
in this function) 
/tmp/pear/install/imagick/imagick_file.c:277: error: expected â;â before âstatusâ 
/tmp/pear/install/imagick/imagick_file.c:306: error: âstatusâ undeclared (first use in this 
function) 
/tmp/pear/install/imagick/imagick_file.c:306: error: âphp_imagick_objectâ has no member named 
âmagick_wandâ 
/tmp/pear/install/imagick/imagick_file.c:310: error: âphp_imagick_objectâ has no member named 
âmagick_wandâ 
/tmp/pear/install/imagick/imagick_file.c:314: error: âphp_imagick_objectâ has no member named 
âmagick_wandâ 
/tmp/pear/install/imagick/imagick_file.c:318: error: âphp_imagick_objectâ has no member named 
âmagick_wandâ 
/tmp/pear/install/imagick/imagick_file.c:326: error: âMagickFalseâ undeclared (first use in 
this function) 
make: *** [imagick_file.lo] Error 1 
ERROR: `make' failed 
+0

+1 ......這一個任何解決方案? – Ondrej

回答

0

在輸出展望以上,其中安裝了問題是:

In file included from /tmp/pear/install/imagick/imagick_file.c:21: 
/tmp/pear/install/imagick/php_imagick.h:49:31: error: wand/MagickWand.h: No such file or 
directory 

意思是,找不到'MagickWand.h'

首先你可以因爲它是由/usr/local/bin/Wand-config

$ yum install pkg-config 

需要通過安裝'pkg-config'嘗試,並嘗試重新安裝imagick,這可能會解決這個問題。

如果不是,請嘗試手動安裝它,並將源目錄中的'config.m4'文件更改爲與安裝實際查找的內容相匹配。這是如下:

$ cd /usr/local 
$ wget http://pecl.php.net/get/imagick-2.2.2.tgz 
$ tar zxvf ./imagick-2.2.2.tgz 
$ cd imagick-2.2.2 

然後,繼續打開config.m4文件之前:

$ nano config.m4 

查找行:

if test -r $WAND_DIR/include/ImageMagick/wand/MagickWand.h; 

並將其更改爲:

if test -r $WAND_DIR/include/ImageMagick-6/wand/MagickWand.h; 

注意:Imag eMagick-6。將其更改爲符合您所需的路徑/版本。

,並繼續安裝:

$ phpize 
$ ./configure 
$ make 
$ make test 
$ make install 

希望這可以幫助別人......