作个记号:Linux下安装ImageMagick和Jmagick
怕搞忘,今天重装的时候碰了很多钉子,环境为:centos 5.4 x64:
?
1、装LibPNG,安装后才能处理png格式图片?
tar -xzvf libpng-1.4.3.tar.gzcd libpng-1.4.3 ./configuremakemake install
?
?2、安装JPEG包,安装后才能处理JPEG格式图片?
tar -xzvf jpegsrc.v8b.tar.gzcd jpeg-8b/./configure --enable-shared --enable-staticmakemake install
?
?3、安装Tiff包,安装后才能处理TIFF格式图片?
tar -xzvf tiff-3.8.0.tar.gzcd tiff-3.8.0./configuremakemake install?4、安装jasper包,安装后才能处理JPEG2000格式图片
?
unzip jasper-1.900.1.zipcd jasper-1.900.1CFLAGS=-fPIC ./configuremake CFLAGS=-fPICmake CFLAGS=-fPIC install?5、安装ImageMagick。
?
tar -xzvf ImageMagick-6.6.3-0.tar.gzcd ImageMagick-6.6.3-0./configure --prefix=/opt/ImageMagick-6.6.3-0 --enable-share --enable-static --with-jpeg=yes --with-png=yes --with-tiff=yes --with-jp2=yes --without-perlmakemake install?6、配置环境
?
echo "/usr/local/lib" > /etc/ld.so.conf.d/usr-local-lib.conf ldconfig?7、安装Jmagick
?
PATH=$PATH:/usr/java/bin;export PATH/configure --with-magick-home=/opt/ImageMagick-6.6.3-0/ --with-java-home=/usr/java/makemake install?8、测试
?
cd /opt/ImageMagick-6.6.3-0/bin./convert hehua.jpg –resize 50% hehua-resize.jpg
?
?
?
?
make[1]: Entering directory `/opt/tools/jmagick/ImageMagick-6.6.3-0' CCLD utilities/animatemagick/.libs/libMagickCore.so: undefined reference to `png_set_longjmp_fn'magick/.libs/libMagickCore.so: undefined reference to `TIFFIsBigEndian'collect2: ld returned 1 exit statusmake[1]: *** [utilities/animate] 错误 1make[1]: Leaving directory `/opt/tools/jmagick/ImageMagick-6.6.3-0'make: *** [all] 错误 2