日期:2014-05-16  浏览次数:20836 次

centos5.5安装php的问题
编译安装PHP(FastCGI模式)
./configure --prefix=/usr/local/webserver/php --with-config-file-path=/usr/local/webserver/php/etc --with-mysql=/usr/local/webserver/mysql --with-mysqli=/usr/local/webserver/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap

报错:
Generating files
creating ./config.status
creating php5.spec
creating main/build-defs.h
creating scripts/phpize
creating scripts/man1/phpize.1
creating scripts/php-config
creating scripts/man1/php-config.1
creating sapi/cli/php.1
creating sapi/cgi/fpm/fpm_autoconf.h
sed: can't read ./sapi/cgi/fpm/fpm_autoconf.h.in: No such file or directory
creating sapi/cgi/fpm/php-fpm.conf
sed: can't read ./sapi/cgi/fpm/conf/php-fpm.conf.in: No such file or directory
creating sapi/cgi/fpm/php-fpm
sed: can't read ./sapi/cgi/fpm/init.d/php-fpm.in: No such file or directory

debug.log里:
./conftest: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory

但是我配置过/etc/ld.so.conf
[root@localhost php-5.2.14]# ldconfig -v | less
/usr/local/webserver/mysql/lib/mysql:
  libmysqlclient.so.16 -> libmysqlclient.so.16.0.0
  libmysqlclient_r.so.16 -> libmysqlclient_r.so.16.0.0

详细按照步骤参考材料:http://blog.s135.com/nginx_php_v6/25/1/

------解决方案--------------------
sed: can't read ./sapi/cgi/fpm/fpm_autoconf.h.in: No such file or directory
源码包是不是有问题
------解决方案--------------------
同感源码包有问题
另外mysql的那个,尝试手动在/usr/lib下建立一个软连接
ln -s /usr/local/webserver/mysql/lib/mysql/libmysqlclient.so.16.0.0 /usr/lib/libmysqlclient.so.16