用JPEG为GD编译PHP 5.4.10



我已经花了好几个小时来做这个了。PHP不能编译libjpeg.

这就是.configure的内容:

checking for the location of libvpx... no
checking for the location of libjpeg... /usr
checking for the location of libpng... yes
checking for the location of libXpm... no

所以没有是,没有不是。

jpeglib.h位于/usr/include/jpeglib.hlibjpeg。So位于/usr/lib/libjpeg. So

我通读了.configure脚本,但找不到一个快速的解决方案。我正在运行Ubuntu 8.04

有什么提示吗?

编辑:同样的情况似乎也发生在自由类型库中。

add --with-gd --with-jpeg-dir=/usr/lib/ --with-png-dir=/usr/lib/

在CentOS 5系统上(jpeglib.hlibjpeg.so也分别位于/usr/include/jpeglib.h/usr/lib/libjpeg.so中),我必须在运行configure脚本时包括以下选项:

--with-gd --with-jpeg-dir=/usr --with-freetype-dir=/usr

这为JPEG和Freetype提供了GD支持(我不需要为GD做任何特别的事情来支持PNG或GIF)。

注意:如果您在注意到GD不包括对这些库的支持之前已经编译了PHP,那么您必须在重新运行configure脚本后运行make clean

最新更新