Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

pecl imagickいれなおす

ImageMagick6.2.9から使える関数が必要なため。

今のバージョンを調べる

rpm -qa | grep -i imagemagick
ImageMagick-6.2.8.0-4.el5_5.3
ImageMagick-devel-6.2.8.0-4.el5_5.3
ImageMagick-6.2.8.0-4.el5_5.3
ImageMagick-devel-6.2.8.0-4.el5_5.3

削除

sudo su
rpm -qa | grep -i imagemagick |xargs rpm -e --allmatches

ImageMagick インストール

  • 依存ライブラリ入れる
yum -y install bzip2-devel lcms-devel libjpeg-devel libX11-devel libXt-devel libtiff-devel ghostscript-devel libXext-devel
cd /usr/local/src/
wget ftp://ftp.kddlabs.co.jp/graphics/ImageMagick/ImageMagick-6.8.6-0.tar.gz
tar xf ImageMagick-6.8.6-0.tar.gz
cd ImageMagick-6.8.6-0
./configure --prefix=/usr/local/ImageMagick-6.8.6
make
paco -D make install
paco -ao
echo /usr/local/ImageMagick-6.8.6/lib/ >> /etc/ld.so.conf.d/ImageMagick-6.8.6.conf
/sbin/ldconfig -p
  • 確認
/usr/local/imagemagick-6.8.6/bin/Magick-config  --version
6.8.6 Q16

pecl imagick いれなおし

pecl uninstall imagick
export PKG_CONFIG_PATH=/usr/local/ImageMagick-6.8.6/lib/pkgconfig
# ヘッダーみつからないですエラー対策 -> checking for MagickWand.h header file... configure: error: Cannot locate header file MagickWand.h
ln -s /usr/local/ImageMagick-6.8.6/include/ImageMagick-6 /usr/local/ImageMagick-6.8.6/include/ImageMagick
pecl install imagick
# Please provide the prefix of Imagemagick installation [autodetect] : /usr/local/ImageMagick-6.8.6
vi php.ini
extension=imagick.so
  • 確認
pecl list | grep imagick
imagick      3.0.1   stable
@violetyk

This comment has been minimized.

Copy link
Owner Author

commented Sep 18, 2013

/tmp/pear/temp/imagick/imagick_class.c: In function ‘zim_imagick_setimageprogressmonitor’:
/tmp/pear/temp/imagick/imagick_class.c:9534: error: ‘php_core_globals’ has no member named ‘safe_mode’
/tmp/pear/temp/imagick/imagick_class.c:9534: error: ‘CHECKUID_CHECK_FILE_AND_DIR’ undeclared (first use in this function)
/tmp/pear/temp/imagick/imagick_class.c:9534: error: ‘CHECKUID_NO_ERRORS’ undeclared (first use in this function)

とかでエラーになったら、

pecl install Imagick-beta

でいれたらいけた。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.