Imagemagick-6.7.6-5安装

编译IM多次,第一次遇到如下问题:
/usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [magick/libMagickCore.la] 错误 1
make[1]: Leaving directory `/home/lvbenwei/source/ImageMagick-6.7.6-5'
make: *** [all] 错误 2

解决办法——重编zlib
cd zlib/1.2.3 //进入zlib目录

CFLAGS="-O3 -fPIC" ./configure   //使用64位元的方法进行编译

make

make install

make clean

编译imagemagick时的选项:./configure LDFLAGS="-L/usr/local/lib" --disable-openmp
disable-openmp是必须的(6.7.6-5之前的版本),不然使用php imagick扩展时会抛段错误

猜你喜欢

转载自godlovesdog.iteye.com/blog/1826190