1

DVにインストールしました

# convert -version
Version: ImageMagick 6.7.4-0 2011-12-21 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP  

しかし、どういうわけか、

#pecl install Imagick

エラーを教えてください。OKです。make./configureでエラーが発生し、100000行後にエラーが発生します

make: *** [imagick_class.lo] Error 1

これは、エラーから返されたコードです


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.7.4 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.5
    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 ld used by cc... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for /usr/bin/ld option to reload object files... -r
    checking for BSD-compatible nm... /usr/bin/nm -B
    checking whether ln -s works... yes
    checking how to recognise dependent libraries... pass_all
    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 string.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 dlfcn.h usability... yes
    checking dlfcn.h presence... yes
    checking for dlfcn.h... yes
    checking for g77... no
    checking for f77... no
    checking for xlf... no
    checking for frt... no
    checking for pgf77... no
    checking for fort77... no
    checking for fl32... no
    checking for af77... no
    checking for f90... no
    checking for xlf90... no
    checking for pgf90... no
    checking for epcf90... no
    checking for f95... f95
    checking whether we are using the GNU Fortran 77 compiler... yes
    checking whether f95 accepts -g... yes
    checking the maximum length of command line arguments... 32768
    checking command to parse /usr/bin/nm -B output from cc object... ok
    checking for objdir... .libs
    checking for ar... ar
    checking for ranlib... ranlib
    checking for strip... strip
    checking if cc supports -fno-rtti -fno-exceptions... no
    checking for cc option to produce PIC... -fPIC
    checking if cc PIC flag -fPIC works... yes
    checking if cc static flag -static works... yes
    checking if cc supports -c -o file.o... 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 libtool
    appending configuration tag "CXX" to libtool
    appending configuration tag "F77" to libtool
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... no
    checking for f95 option to produce PIC... -fPIC
    checking if f95 PIC flag -fPIC works... yes
    checking if f95 static flag -static works... yes
    checking if f95 supports -c -o file.o... yes
    checking whether the f95 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    configure: creating ./config.status
    config.status: creating config.h
    running: make
    /bin/sh /var/tmp/pear-build-root/imagick-3.0.1/libtool --mode=compile cc  -I. -I/root/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/var/tmp/pear-build-root/imagick-3.0.1/include -I/var/tmp/pear-build-root/imagick-3.0.1/main -I/root/tmp/pear/temp/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 /root/tmp/pear/temp/imagick/imagick_class.c -o imagick_class.lo
    mkdir .libs
     cc -I. -I/root/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/var/tmp/pear-build-root/imagick-3.0.1/include -I/var/tmp/pear-build-root/imagick-3.0.1/main -I/root/tmp/pear/temp/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 /root/tmp/pear/temp/imagick/imagick_class.c  -fPIC -DPIC -o .libs/imagick_class.o
    In file included from /root/tmp/pear/temp/imagick/imagick_class.c:21:
    /root/tmp/pear/temp/imagick/php_imagick.h:49:31: error: wand/MagickWand.h: No such file or directory
    In file included from /root/tmp/pear/temp/imagick/imagick_class.c:22:
    /root/tmp/pear/temp/imagick/php_imagick_defs.h:72: error: expected specifier-qualifier-list before 'MagickWand'
    /root/tmp/pear/temp/imagick/php_imagick_defs.h:80: error: expected specifier-qualifier-list before 'DrawingWand'
    /root/tmp/pear/temp/imagick/php_imagick_defs.h:86: error: expected specifier-qualifier-list before 'PixelIterator'
    /root/tmp/pear/temp/imagick/php_imagick_defs.h:98: error: expected specifier-qualifier-list before 'PixelWand'
    /root/tmp/pear/temp/imagick/php_imagick_defs.h:105: error: expected ')' before '*' token
    /root/tmp/pear/temp/imagick/php_imagick_defs.h:117: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'php_imagick_read_image_using_imagemagick'
    /root/tmp/pear/temp/imagick/php_imagick_defs.h:119: er

本当に?それは不可能だ?私は何を間違っていますか?

4

3 に答える 3

1

書いたときに上記と同じエラーが発生しました(wand / MagickWand.hが見つかりませんでした)

pecl install imagick

config.m4-fileを検索したところ、「$ WAND_BINARY --cflags」を使用してインクルードディレクトリが(自動的に)検出されることがわかりました。ここで、$WAND_BINARYはf.exになります。/ usr / local / bin/Wand-configになります。

とにかく、コマンドラインからこれを実行しようとすると、pkg-configが見つからないと言われました。だから私がする必要があるのは、pkg-configをインストールすることだけでした。私はDebianで実行しているので、書く必要がありました

apt-get install pkg-config

その後、すべてがうまくいきました!

于 2012-01-13T13:52:23.187 に答える
0

さて、その後

uname -a

私は64台のマシンを使用していることがわかったので、インストールされている32個のrpmをすべて削除しました。

rpm -e package-xyz.rpm

次に、ここから正しいbuidを取得します:ftp://ftp.pbone.net/mirror/centos.karan.org/el5/misc/testing/x86_64/RPMS/およびftp://ftp.pbone.net/mirror/centos .karan.org / el5 / extras / tests / x86_64 / RPMS /(エクストラミラーにはimagemagick develに必要なjasperライブラリがあります)ここではwgetを使用し、rpm -Uvh package-xyz.rpmpackage2-abc.rpm..を使用してインストールします。 (かなりミュー、ここで同じ手順を実行しますが、64ファイルhttp://www.ndchost.com/wiki/server-administration/imagick-class-errorを使用します)

「peclinstallImagick」によるインストールは期待どおりに進み、残りの手順はphpで有効にすることでした。

echo "extension=imagick.so" > /etc/php.d/imagick.ini

httpdを再起動します:

/etc/init.d/httpd restart

そして、すべてが正常にロードされたかどうかを確認します。

php -m | grep imagick

終わり!これが、mediatemplecentosdvマシンでimagemagickをセットアップしようとしている人に役立つことを願っています。乾杯!

于 2011-12-23T03:10:53.693 に答える
-1

私は、noexecの問題でマウントされたtmp dirから、などなど、これをぐるぐる回ってきました。

しかし、この問題は yum で簡単に解決できるようです:

yum install php-pecl-imagick

次に、Apacheを再起動すると、問題は解決しました。

于 2012-11-11T20:49:39.660 に答える