经过在网上的各种搜罗,终于搞定了,记录一下,有些地方需要使用root权限的,就sudo了:
(一)请先确保系统已经安装以下包:
rpm -q libjpeg libjpeg-devel libpng libpng-devel libtiff libtiff-devel libungif libungif-devel perl-CPAN perl make gcc
或者直接用以下命令安装
yum install libjpeg
yum install libjpeg-devel
yum install libpng
yum install libpng-devel
yum install libtiff
yum install libtiff-devel
yum install libungif
yum install libungif-devel
yum install perl-CPAN
(例如,如果没安装perl-CPAN,则后面会报错Can't locate ExtUtils/MakeMaker.pm)
(二)安装ImageMagick,最好保证ImageMagick和JMagic版本一致
1. 下载ImageMagick-6.4.0-0.tar.gz from
wget http://downloads.jmagick.org/6.4.0/ImageMagick-6.4.0-0.tar.gz,
2. tar -xzvf ImageMagick-6.4.0-0.tar.gz
3. mkdir /usr/local/imagemagick
4. cd ImageMagick-6.4.0-0
5. ./configu