编译安装php-mysql

{{{

/usr/local/php/bin/phpize

Configuring for: PHP Api Version: 20090626 Zend Module Api No: 20090626 Zend Extension Api No: 220090626

./configure --with-php-config=/usr/local/php/bin/php-config --with-mysql=/usr --with-zlib-dir=/usr --with-mysql-dir=/lib64

checking for PHP installed headers prefix... /usr/local/php/include/php checking if debug is enabled... no checking if zts is enabled... no checking for re2c... no configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. checking for gawk... gawk checking for MySQL support... yes, shared checking for specified location of the MySQL UNIX socket... no checking for the location of libz... /lib64 checking for mysql_close in -lmysqlclient... no checking for mysql_error in -lmysqlclient... no configure: error: mysql configure failed. Please check config.log for more information. }}}

通过查找libmysqlclient,发现是在/usr/lib64/mysql/目录内的libmysqlclient.so.15.0.0做的软连接,PHP默认是去的 /usr/lib/搜索,所以没有找到.找到问题了就好解决了. 解决办法就是: 1. {{{ cp -rp /usr/lib64/mysql/libmysqlclient.so.15.0.0 /usr/lib/libmysqlclient.so }}} 1. {{{ centos : --with-mysql=/usr/lib64/mysql 或者cp /usr/lib64/mysql/* /usr/lib/mysql/ }}}

Comments !