linux 64位 红帽子 5装apache+mysql+php+gd,结果gd库里jpeg不能用

moon_xhl 2009-04-17 01:56:36
linux 64位 红帽子 5,装apache+mysql+php+gd,结果gd库里的jpeg不能用,造成的结果是不能生成jpg的缩略图,我在编译的gd库后,jpeg,gif,png都是OK的,zend 我也装了,搞了好几天了,求助各位
phpinfo信息是 http://www.jiayougo.com/phpinfo.php
...全文
730 16 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
superliyubo 2009-04-23
  • 打赏
  • 举报
回复
关注,我比楼主的问题还多,编译都没通过!
moon_xhl 2009-04-17
  • 打赏
  • 举报
回复
我前面就用的是这种方法,但编译出来,还是不行.
morris88 2009-04-17
  • 打赏
  • 举报
回复
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).
moon_xhl 2009-04-17
  • 打赏
  • 举报
回复
那如何写呢,是不是在./configure前面加
CFLAGS="-O3 -fPIC"

比如CFLAGS="-O3 -fPIC" ./configure --with-png --with-freetype --with-jpeg
morris88 2009-04-17
  • 打赏
  • 举报
回复
缺省编译出来的是32位的...
你按64位的重新编译一次吧...
moon_xhl 2009-04-17
  • 打赏
  • 举报
回复
是jpegsrc.v6b.tar.gz,我一直也在找64的,但没找到
morris88 2009-04-17
  • 打赏
  • 举报
回复
jpeg 是 64 位的吗?
moon_xhl 2009-04-17
  • 打赏
  • 举报
回复
I had builed it,but还是不行,
moon_xhl 2009-04-17
  • 打赏
  • 举报
回复
我编译完gd库显示的是正确的

** Configuration summary for gd 2.0.33:

Support for PNG library: yes
Support for JPEG library: yes
Support for Freetype 2.x library: yes
Support for Fontconfig library: no
Support for Xpm library: no
Support for pthreads: yes
moon_xhl 2009-04-17
  • 打赏
  • 举报
回复
I try it now.
morris88 2009-04-17
  • 打赏
  • 举报
回复
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).
moon_xhl 2009-04-17
  • 打赏
  • 举报
回复
都装了,
morris88 2009-04-17
  • 打赏
  • 举报
回复
A3、安装libpng 

tar xzvf libpng-1.2.5.tar.gz
#不要用--prefix自定义安装目录,影响gd的安装
cd libpng-1.2.5
cp scripts/makefile.std makefile
make test
make install

A3、安装jpeg

tar xzvf jpegsrc.v6b.tar.gz
./configure --prefix=/usr/local/modules/jpeg6 --enable-shared --enable-static
make
make install

A4、安装GD

tar xzvf gd-2.0.33.tar.gz
./configure --prefix=/usr/local/modules/gd --with-jpeg=/usr/local/modules/jpeg6 --with-png --with-zlib --with-freetype=/usr/local/modules/freetype
make
make install


上面的都装了吧...
moon_xhl 2009-04-17
  • 打赏
  • 举报
回复
32的行的,32位我装过好多,是没问题的
morris88 2009-04-17
  • 打赏
  • 举报
回复
32位的能行不?还是只是64位的不行呢?
moon_xhl 2009-04-17
  • 打赏
  • 举报
回复
在线等,谢谢

19,619

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧