当前位置: 技术问答>linux和unix
linux 64位 红帽子 5装apache+mysql+php+gd,结果gd库里jpeg不能用
来源: 互联网 发布时间:2016-05-31
本文导语: linux 64位 红帽子 5,装apache+mysql+php+gd,结果gd库里的jpeg不能用,造成的结果是不能生成jpg的缩略图,我在编译的gd库后,jpeg,gif,png都是OK的,zend 我也装了,搞了好几天了,求助各位 phpinfo信息是 http://www.jiayougo.com/phpinfo...
linux 64位 红帽子 5,装apache+mysql+php+gd,结果gd库里的jpeg不能用,造成的结果是不能生成jpg的缩略图,我在编译的gd库后,jpeg,gif,png都是OK的,zend 我也装了,搞了好几天了,求助各位
phpinfo信息是 http://www.jiayougo.com/phpinfo.php
phpinfo信息是 http://www.jiayougo.com/phpinfo.php
|
How to build jpegsrc.v6b on 64-bit Linux machines
jpegsrc is no longer maintained and has not been updated since the Clinton administration. This is odd considering how critical this library is to so many applications.
If you are trying to build on a 64-bit Linux machine you will probably get this error during the ./configure step:
checking host system type... Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized
The fix is simple -- just copy '/usr/share/libtool/config.guess' and '/usr/share/libtool/config.sub' to the same directory as the jpeg-6b ./configure script. You can also copy from from /usr/share/automake-1.9/.
cp /usr/share/libtool/config.guess .
cp /usr/share/libtool/config.sub .
./configure --enable-shared --enable-static
One site suggests that you also need tell the jpegsrc build where the 64-bit libdir is located:
make libdir=/usr/lib64
make libdir=/usr/lib64 install
That will change the directory where 'make install' puts the libjpeg library files, but you may not want that if you are installing libjpeg to a custom path (in other words, if you used the --prefix option for configure).
jpegsrc is no longer maintained and has not been updated since the Clinton administration. This is odd considering how critical this library is to so many applications.
If you are trying to build on a 64-bit Linux machine you will probably get this error during the ./configure step:
checking host system type... Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized
The fix is simple -- just copy '/usr/share/libtool/config.guess' and '/usr/share/libtool/config.sub' to the same directory as the jpeg-6b ./configure script. You can also copy from from /usr/share/automake-1.9/.
cp /usr/share/libtool/config.guess .
cp /usr/share/libtool/config.sub .
./configure --enable-shared --enable-static
One site suggests that you also need tell the jpegsrc build where the 64-bit libdir is located:
make libdir=/usr/lib64
make libdir=/usr/lib64 install
That will change the directory where 'make install' puts the libjpeg library files, but you may not want that if you are installing libjpeg to a custom path (in other words, if you used the --prefix option for configure).