先日のことですが、ちとCentOSでPHPのPECLモジュールのimagickを入れることになりました。ちょっと突っかかったのでメモ。
ImageMagickとPEARはすでに入っていたので、まずはphpizeの為のphp-develをyumでインストールします。
[shell]
yum install php-devel
[/shell]
ここはとくに問題ないので、次にpeclコマンドでimagickを入れてみます。
[shell]
pecl install imagick
..
checking if ImageMagick version is at least 6.2.4… configure: error: no. You need at least Imagemagick version 6.2.4 to use Imagick.
ERROR: `/usr/lib/php/temp/imagick/configure –with-imagick’ failed
[/shell]
あう(´・ω・`)
どうやら以前にyumでインストールされていたImageMagickのバージョンが6.0.7らしい。
いい方法は無いかとググッてみたら、ちょうど前日に同じ事をやっていた人を発見。
CentOSにImageMagickをインストール – com.posed.
同様の手順でコンパイルしてみることにしましたが。。。
[shell]
./configure
…
configure: error: C++ preprocessor “/lib/cpp” fails sanity check
[/shell]
あう(´・ω・`)
どうやらC++のコンパイラが入っていなかったらしい。yumでインストール。
[shell]
yum install gcc-c++
[/shell]
気を取り直してコンパイル、インストール。
[shell]
./configure
make
pecl install imagick
[/shell]
おk
コメント