參考別人寫到的安裝方法,自己來試看看。如果是FREEBSD上要裝,請參考這篇
# uname -a
Linux dns3.tcc.edu.tw 2.6.9-34.ELsmp #1 SMP Wed Mar 8 00:27:03 CST 2006 i686 i686 i386 GNU/Linux (已經5年的Linux)
一、照順序執行yum..
yum install ImageMagick.i386 (ok)
yum install ImageMagick-devel.i386 (ok)
執行 pecl install imagick
出現錯誤:找不到 pecl -bash: pecl: command not found 解決: wget http://pear.php.net/go-pear.phar php go-pear.phar 如此就安裝了pear/pecl (ok) |
再執行 pecl install imagick
出現錯誤 Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF 懷疑pear版本太舊,查看版本 升級 # pecl channel-update pecl.php.net 試著安裝 autoconf |
但是又出現新的錯誤:
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: `/tmp/pear/temp/imagick/configure --with-imagick' failed
yum 安裝的版本只有 6.0 天啊,只好去官網找src 回來安裝,2010/7/17的版本是version 6.6.3-0.
http://www.imagemagick.org/script/download.php
magick/.libs/libMagickCore.so: undefined reference to `TIFFIsBigEndian'
collect2: ld returned 1 exit status
make[1]: *** [utilities/animate] Error 1
make[1]: Leaving directory `/root/ImageMagick-6.6.3-0'
make: *** [all] Error 2
卡住~~FREEBSD就沒有這麼麻煩。
二、把imagick.so module 加入 apache後重啟:
echo "extension=imagick.so" > /etc/php.d/imagick.ini
/etc/init.d/httpd restart
出現錯誤:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/imagick.so' - /usr/lib64/php/modules/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
三、檢查有沒有裝好:
php -m | grep imagick
[參考資料]
Install imagemagick with PHP imagick extension on CentOS
http://www.matteomattei.com/en/install-imagemagick-with-php-imagick-extension-on-centos
安裝pecl http://pear.php.net/manual/en/installation.getting...
完整連結 http://note.tc.edu.tw/583.html
留言列表