在dreamhost上编译php5时找不到libmysqlclient

我试图在Dreamhost上编译php5,之后做了什么http://wiki.dreamhost.com/index.php/Installing_PHP5说,我已经编译了除php5之外的所有组件。 运行时

$ ./configure ${PHPFEATURES} 

它报告错误

 configure: error: Cannot find libmysqlclient under /usr. Note that the MySQL client library is not bundled anymore! 

但实际上我发现存在/usr/lib64/lib64/libmysqlclient.so.15.0.0。 如何帮助configurationfind它? 非常感谢。

你可以尝试给不同的path为MySQL,即:

–with-MySQL的=在/ usr / lib64下

MysqL安装包含一个名为mysql_config的脚本,最好的办法是将编译器标志指向这个,这样编译系统就使用安装提供的编译器/链接器标志。

 --with-mysql=/path/to/bin/mysql_config 

在使用PHP 5.3的时候,你也可以使用“myslqnd”作为一个path,这个path可以启用“MySQL本地驱动程序”,它是一个PHP特定的MySQL客户端库的替代品,并独立于任何libmysql。

也许对于一些可怜的灵魂来说,

./configure --with-apxs2=/usr/sbin/apxs --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd