php 安装 configure: error: Cannot find libmysqlclient under /usr. 解决

./configure --with-libxml-dir=/usr --with-apxs2=/home/admin/local/apache/bin/apxs --with-mysql=/usr/lib64/mysql/ --prefix=/home/admin/local && make -j 16 && make install 

安装php报:configure: error: Cannot find libmysqlclient under /usr

但是, libmysqlclient 明明是安装在/usr/lib64/mysql下面的,后来在网上查了一下,貌似configure脚本的这个--with-mysql参数在RHEL5.3下有问题。

所以,索性搞两个软链接,问题解决

ln -s /usr/lib64/mysql/libmysqlclient.a /usr/lib/libmysqlclient.a 

ln -s /usr/lib64/mysql/libmysqlclient_r..a /usr/lib/libmysqlclient_r.a 

原文地址:https://www.cnblogs.com/welkinwalker/p/2091408.html