- tar -xzvf tiff-3.8.0.tar.gz
- cd tiff-3.8.0
- ./configure
- make
- make install
-
我安装完成后,在命令行处理图片,报错:libtiff.so.3: cannot open shared object file: No such file or directory
此模块也用不到,可以不安装。
3、安装jasper包:
下载地址:http://www.ece.uvic.ca/~mdadams/jasper/
安装后才能处理JPEG2000格式图片(文件扩展名是 .jp2 .j2c)
- unzip jasper-1.900.1.zip
- cd jasper-1.900.1
- CFLAGS=-fPIC ./configure
- make CFLAGS=-fPIC
- make CFLAGS=-fPIC install
4、安装jpeg包
下载地址:http://www.ijg.org/files/jpegsrc.v6b.tar.gz
- #安装jpeg
- cd /disk/src
- tar -xzf ../soft/jpegsrc.v6b.tar.gz
- cd jpeg-6b/
- ./configure
- make && make install
5、安装zlib
下载地址 http://zlib.net/zlib-1.2.7.tar.gz
- cd /disk/src
- tar -xzf ../soft/zlib-1.2.7.tar.gz
- cd cd zlib-1.2.7
- ./configure
- make && make install
6、安装png
下载地址:http://www.libpng.org/pub/png/pngcode.html
wget ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.50.tar.gz cd /disk/src - tar -xzf ../soft/libpng-1.2.50.tar.gz
- cd libpng-1.2.50
- cp scripts/makefile.std makefile
- make
- make install
7、安装freetype
下载地址:
http://www.freetype.org/
http://download.savannah.gnu.org/releases/freetype/freetype-2.4.9.tar.gz
- cd /disk/src
- tar -xzf ../soft/freetype-2.4.9.tar.gz
- cd freetype-2.4.9
- ./configure
- make
- make install
8、安装ImageMagick
#宣告64位环境 - export CFLAGS=’-fPIC’
- tar -xzf ../soft/ImageMagick-6.8.0-0.tar.gz
- cd ImageMagick-6.8.0-0/
- ./configure --with-quantum-depth=8 --enable-share --enable-static
- make all
- make install
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread - /usr/bin/ld: cannot find -lltdl
- collect2: ld returned 1 exit status
- libtool: install: error: relink `magick/libMagickCore.la' with the above command before installing it
- make[2]: *** [install-libLTLIBRARIES] 错误 1
- make[2]: Leaving directory `/disk/src/ImageMagick-6.8.0-0'
install: error: relink `magick/libMagickCore.la' with the above command before installing it /usr/bin/ld: cannot find -lltdl
解决方法:
usr/bin/ld: cannot find错误的解决方法
二、二进制RPM安装
1、先卸载后安装
安装:
- yum install ImageMagick ImageMagick-devel
如果已安装过,先执行下面的卸载命令,我已安装过6.2.8版本,所以要先卸载。
- [root@jbxue soft]# convert --version
- Version: ImageMagick 6.2.8 05/07/12 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html
- Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC
- [root@jbxue soft]# rpm -qa| grep ImageMagick
- ImageMagick-devel-6.2.8.0-15.el5_8
- ImageMagick-6.2.8.0-15.el5_8
- ImageMagick-devel-6.2.8.0-15.el5_8
- ImageMagick-6.2.8.0-15.el5_8
卸载:yum erase ImageMagick 或 yum remove ImageMagick。
2、安装基础库
- yum install libtool-ltdl libtool-ltdl-devel freetype freetype-devel fontconfig-devel
- wget http://centos.ustc.edu.cn/epel/5/x86_64/epel-release-5-4.noarch.rpm
- rpm -Uvh epel-release-5-4.noarch.rpm
- yum --enablerepo=epel install jasper jasper-libs jasper-devel
3、安装ImageMagick-6.8.0-0.x86_64.rpm
下载地址:
http://www.imagemagick.org/script/binary-releases.php#unix
wget ftp://ftp.imagemagick.org/pub/ImageMagick/linux/CentOS/x86_64/ImageMagick-6.8.0-0.x86_64.rpm - wget ftp://ftp.imagemagick.org/pub/ImageMagick/linux/CentOS/x86_64/ImageMagick-devel-6.8.0-0.x86_64.rpm
rpm -Uvh ImageMagick-6.8.0-0.x86_64.rpm
出现错误:
- yum install --nogpgcheck ImageMagick-6.8.0-0.x86_64.rpm
4、检测安装结果
[root@jbxue soft]# convert --version Version: ImageMagick 6.8.0-0 2012-10-11 Q16 http://www.imagemagick.org - Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
- Features: OpenMP
三、参考资料
http://www.imagemagick.org/script/download.php
http://www.imagemagick.org/script/index.php |