当前位置: 技术问答>linux和unix
求救:在CentOS5.5上安装配置php时出错
来源: 互联网 发布时间:2017-01-23
本文导语: 错误信息为最下边蓝色字体所示: [root@localhost /]# ls /usr/local apache2 etc games include lib libmcrypt libxml2 sbin src bin freetype gd2 jpeg6 libexec libpng mysql share [r...
错误信息为最下边蓝色字体所示:
[root@localhost /]# ls /usr/local
apache2 etc games include lib libmcrypt libxml2 sbin src
bin freetype gd2 jpeg6 libexec libpng mysql share
[root@localhost /]# ls test
autoconf-2.61 libmcrypt-2.5.8 ncurses-5.6.tar.gz
freetype-2.3.5 libpng-1.2.31 php-5.2.6
freetype-2.3.5.tar.gz libxml2-2.6.30 php-5.2.6.tar.gz
gd-2.0.35 lost+found phpMyAdmin-3.0.0-rc1-all-languages
httpd-2.2.9 mysql-5.0.41 zlib-1.2.3
jpeg-6b ncurses-5.6 zlib_20111206.install.log
[root@localhost /]# cd test/php-5.2.6
[root@localhost php-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-png-dir=/usr/local/libpng/
> --with-jpeg-dir=/usr/local/jpeg6/
> --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
loading cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
.
. (省略)
.
Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... no
checking for Apache 1.x module support... no
.
. (省略)
.
Running system checks
checking for sendmail... /usr/sbin/sendmail
checking whether system uses EBCDIC... no
checking whether byte ordering is bigendian... no
checking whether writing to stdout works... This is the test message -- yes
checking for socket... yes
.
. (省略)
.
General settings
checking whether to include gcov symbols... no
checking whether to include debugging symbols... no
checking layout of installed files... PHP
.
. (省略)
.
Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... /usr/local/libxml2/
checking for xml2-config path... /usr/local/libxml2//bin/xml2-config
checking whether libxml build works... yes
checking for OpenSSL support... no
checking for Kerberos support... no
checking for PCRE support... yes
checking for ZLIB support... no
checking if the location of ZLIB install directory is defined... no
checking whether to enable bc style precision math functions... no
checking for BZip2 support... no
checking whether to enable calendar conversion support... no
checking whether to enable ctype functions... yes
checking for cURL support... no
checking if we should use cURL for url streams... no
checking size of long... (cached) 4
checking size of int... (cached) 4
checking for int32_t... yes
checking for uint32_t... yes
checking for sys/types.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for strtoll... yes
checking for atoll... yes
checking for strftime... (cached) yes
checking for QDBM support... no
checking for GDBM support... no
checking for NDBM support... no
checking for Berkeley DB4 support... no
checking for Berkeley DB3 support... no
checking for Berkeley DB2 support... no
checking for DB1 support... no
checking for DBM support... no
checking for CDB support... no
checking for INI File support... no
checking for FlatFile support... no
checking whether to enable DBA interface... no
checking whether to enable dbase support... no
checking whether to enable DOM support... yes
checking for xml2-config path... (cached) /usr/local/libxml2//bin/xml2-config
checking whether libxml build works... (cached) yes
checking whether to enable EXIF (metadata from images) support... no
checking for FrontBase SQL92 (fbsql) support... no
checking for FDF support... no
checking whether to enable input filter support... yes
checking pcre install prefix... no
checking whether to enable FTP support... no
checking OpenSSL dir for FTP... no
checking for GD support... yes
checking for the location of libjpeg... /usr/local/jpeg6/
checking for the location of libpng... /usr/local/libpng/
checking for the location of libXpm... no
checking for FreeType 1.x support... no
checking for FreeType 2... /usr/local/freetype/
checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD... no
configure: error: libjpeg.(a|so) not found.
[root@localhost php-5.2.6]#
上边的加粗蓝色字体为错误信息,请问是什么原因?
[root@localhost /]# ls /usr/local
apache2 etc games include lib libmcrypt libxml2 sbin src
bin freetype gd2 jpeg6 libexec libpng mysql share
[root@localhost /]# ls test
autoconf-2.61 libmcrypt-2.5.8 ncurses-5.6.tar.gz
freetype-2.3.5 libpng-1.2.31 php-5.2.6
freetype-2.3.5.tar.gz libxml2-2.6.30 php-5.2.6.tar.gz
gd-2.0.35 lost+found phpMyAdmin-3.0.0-rc1-all-languages
httpd-2.2.9 mysql-5.0.41 zlib-1.2.3
jpeg-6b ncurses-5.6 zlib_20111206.install.log
[root@localhost /]# cd test/php-5.2.6
[root@localhost php-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-png-dir=/usr/local/libpng/
> --with-jpeg-dir=/usr/local/jpeg6/
> --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
loading cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
.
. (省略)
.
Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... no
checking for Apache 1.x module support... no
.
. (省略)
.
Running system checks
checking for sendmail... /usr/sbin/sendmail
checking whether system uses EBCDIC... no
checking whether byte ordering is bigendian... no
checking whether writing to stdout works... This is the test message -- yes
checking for socket... yes
.
. (省略)
.
General settings
checking whether to include gcov symbols... no
checking whether to include debugging symbols... no
checking layout of installed files... PHP
.
. (省略)
.
Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... /usr/local/libxml2/
checking for xml2-config path... /usr/local/libxml2//bin/xml2-config
checking whether libxml build works... yes
checking for OpenSSL support... no
checking for Kerberos support... no
checking for PCRE support... yes
checking for ZLIB support... no
checking if the location of ZLIB install directory is defined... no
checking whether to enable bc style precision math functions... no
checking for BZip2 support... no
checking whether to enable calendar conversion support... no
checking whether to enable ctype functions... yes
checking for cURL support... no
checking if we should use cURL for url streams... no
checking size of long... (cached) 4
checking size of int... (cached) 4
checking for int32_t... yes
checking for uint32_t... yes
checking for sys/types.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for strtoll... yes
checking for atoll... yes
checking for strftime... (cached) yes
checking for QDBM support... no
checking for GDBM support... no
checking for NDBM support... no
checking for Berkeley DB4 support... no
checking for Berkeley DB3 support... no
checking for Berkeley DB2 support... no
checking for DB1 support... no
checking for DBM support... no
checking for CDB support... no
checking for INI File support... no
checking for FlatFile support... no
checking whether to enable DBA interface... no
checking whether to enable dbase support... no
checking whether to enable DOM support... yes
checking for xml2-config path... (cached) /usr/local/libxml2//bin/xml2-config
checking whether libxml build works... (cached) yes
checking whether to enable EXIF (metadata from images) support... no
checking for FrontBase SQL92 (fbsql) support... no
checking for FDF support... no
checking whether to enable input filter support... yes
checking pcre install prefix... no
checking whether to enable FTP support... no
checking OpenSSL dir for FTP... no
checking for GD support... yes
checking for the location of libjpeg... /usr/local/jpeg6/
checking for the location of libpng... /usr/local/libpng/
checking for the location of libXpm... no
checking for FreeType 1.x support... no
checking for FreeType 2... /usr/local/freetype/
checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD... no
configure: error: libjpeg.(a|so) not found.
[root@localhost php-5.2.6]#
上边的加粗蓝色字体为错误信息,请问是什么原因?
|
你看一下你的/usr/local/jpeg6/目录中是否有libjpeg.a或者libjpeg.so文件,如果没有就不行,如果有相似的可以建立一个link文件
|
libjpeg.so库找不到。看一下你/usr/lib/ 或者/usr/lib64下有没有。
configure一般的搜索编译路径为/usr/lib/下,因为php默认就在/usr/lib/下找相关库文件,而x64机器上是在:/usr/lib64.这时你就可以直接把需要的库文件从/usr/lib64中拷贝到/usr/lib/中去就可以了
configure一般的搜索编译路径为/usr/lib/下,因为php默认就在/usr/lib/下找相关库文件,而x64机器上是在:/usr/lib64.这时你就可以直接把需要的库文件从/usr/lib64中拷贝到/usr/lib/中去就可以了