Ps: 正确解答此问题者,追加200分!不够的还可以增加!谢谢啊! 无语啊。。。本来已经搭建好的源码环境,结果由于PHP版本太高,无法用Zend ZendOptimizer。我就把PHP5.6.4给卸载了,然后想装一个5.2.6的: 结果在配置时始终出错啊: 配置语句: # ./configure --prefix=/usr/local/php/ --with-config-file-path=/usr/local/php/etc/ --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql/ --with-libxml-dir=/usr/local/libxml2/ --with-jpeg-dir=/usr/local/jpeg6/ --with-png-dir=/usr/local/libpng/ --with-freetype-dir=/usr/local/freetype/ --with-gd=/usr/local/gd2 --with-mcrypt=/usr/local/libmcrypt/ --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-soap --enable-mbstring=all --enable-sockets 出错信息为: configure: error: GD build test failed. Please check the config.log for details. # cat config.log 发现错误如下(由于字数限制,下面省略了一些行): /usr/local/gd2/lib/libgd.so: undefined reference to `jpeg_destroy_decompress@LIBJPEG_6.2' /usr/local/gd2/lib/libgd.so: undefined reference to `jpeg_CreateCompress@LIBJPEG_6.2' /usr/local/gd2/lib/libgd.so: undefined reference to `jpeg_read_header@LIBJPEG_6.2' /usr/local/gd2/lib/libgd.so: undefined reference to `jpeg_read_scanlines@LIBJPEG_6.2' /usr/local/gd2/lib/libgd.so: undefined reference to `jpeg_start_compress@LIBJPEG_6.2' /usr/local/gd2/lib/libgd.so: undefined reference to `jpeg_destroy_compress@LIBJPEG_6.2' ………… /usr/local/gd2/lib/libgd.so: undefined reference to `jpeg_std_error@LIBJPEG_6.2' /usr/local/gd2/lib/libgd.so: undefined reference to `jpeg_finish_compress@LIBJPEG_6.2' 这样的错误在config.log这个文件中出现了很多次。自己已经重装了jpeg6,重装了GD,都不行。。请问如何解决,非常感谢!
此问题已自己解决
./configure --prefix=/usr/local/php/ --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php/lib/ --with-config-file-scan-dir=/usr/local/etc/ --with-zlib --with-curl --enable-bcmath --with-jpeg-dir --with-png-dir --with-xpm-dir --with-freetype-dir --with-gd --with-mhash --enable-mbstring --with-mcrypt --with-libxml-dir --with-iconv-dir --with-pcre-dir --enable-mysqlnd --with-mysql=mysqlnd --with-mysqli=mysqlnd
看一下是不是有库不全?
看一下是不是有库不全?
安装 php 5.5.25 多加了参数 --with-gd=/usr/local/gd
/usr/local/gd = 2.0.35 升级 2.44 之后 报错 如下解决:
[root@s php-5.5.25]#
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql/ --with-libxml-dir=/usr/local/libxml2/ --with-png-dir=/usr/local/libpng/ --with-jpeg-dir=/usr/local/jpeg/ --with-freetype-dir=/usr/local/freetype/ --with-gd --with-mcrypt=/usr/local/libmcrypt/ --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-soap --enable-mbstring=all --enable-sockets