您的位置:首页 > 数据库 > MySQL

configure: error: Cannot find libmysqlclient under /usr.

2015-11-16 09:38 666 查看
checking for 8-bit clean memcmp... yes
checking for mcrypt support... no
checking for mhash support... no
checking whether to include mime_magic support... no
checking for MING support... no
checking for mSQL support... no
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!

通过查找libmysqlclient是在/usr/lib64/目录内的libmysqlclient.so.18.做的软连接,php默认的搜索路径是/usr/lib/搜索.
解决办法:
如果mysql目录没有,需要创建,再把/usr/lib64/目录下的libmysqlclient.so libmysqlclient.so.18 libmysqlclient.so.18.1.0复制到 /usr/lib/mysql文件夹中
[root@localhost ~]# mkdir /usr/lib/mysql
[root@localhost ~]# cd /usr/lib64
[root@localhost lib64]# cp libmysqlclient.* /usr/lib/mysql
[root@localhost lib64]#
进入php-5.2.9目录./configure即可
[root@localhost ~]# cd /usr/src/php-5.2.9
[root@localhost php-5.2.9]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql/ --with-libxml-dir --enable-mbstring
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  configure: error: Ca