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

时间:2023-03-09 21:16:53
configure: error: Cannot find libmysqlclient under /usr Note that the MySQL client library is not bundled anymore! 报错解决

错误说明

今天在centos 6.3 64位版本上安装PHP5.4.3时在./configure 步骤的时候出现了下面错误
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!

原因分析与解决

通过查找libmysqlclient,发现是在/usr/lib64/mysql/目录内的libmysqlclient.so.15.0.0做的软连接,PHP默认是去的/usr/lib/搜索,所以没有找到.
解决办法就是:
cp /usr/lib64/mysql/* /usr/lib/mysql/
然后进行./configure即可,如果服务器没有/usr/lib/mysql/ 目录,则在/usr/lib/目录下创建mysql目录即可