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

今天在64位centos5.6系统上编译PHP5.2.17报错

checking for MySQL support... yes, shared
checking for specified location of the MySQL UNIX socket... no
checking for the location of libz... no
checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!
[root@zjlca mysql]# 

 

经查,问题是64位系统中 libmysqlclient 默认安装到了 /usr/lib64/mysql/ 目录下

而/usr/lib 目录下没有相应文件,但是php编译时,要去 /usr/lib目录下查找

 

解决方法:

ln -s /usr/lib64/mysql/libmysqlclient.so.15.0.0/usr/lib/libmysqlclient.so

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值