在/usr下找不到libmysqlclient.在Ubuntu 12.4上从源代码构建PHP 5.2时 [英] Cannot find libmysqlclient under /usr. while build PHP 5.2 from source on Ubuntu 12.4

查看:157
本文介绍了在/usr下找不到libmysqlclient.在Ubuntu 12.4上从源代码构建PHP 5.2时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用以下配置从Ubuntu 12.4 64bit的源代码构建PHP 5.2.17:

I was trying to build PHP 5.2.17 from source on Ubuntu 12.4 64bit using this configuration:

./configure --prefix=/opt/php5.2 --with-config-file-path=/opt/php5.2 --with-mysql 

但我不断收到此错误:

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

任何想法如何解决这个问题?

Any Idea how to resolve this?

我最小化了configure命令,因此它只针对mysql.我也在运行64位版本的ubuntu.

I minimized the configure command so it just focuses to mysql. also I'm running a 64bit version of ubuntu.

尝试运行ldconfig -v |grep mysql,这是输出

# ldconfig -v |grep mysql
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Cannot stat /usr/lib/x86_64-linux-gnu/libnss_db.so: No such file or directory
libmysqlclient.so.18 -> libmysqlclient_r.so.18.0.0
libmysqlpp.so.3 -> libmysqlpp.so.3.1.0

推荐答案

感谢@hakre的帮助. 这是我使用的命令,它可以正常工作:

Thanx @hakre for the assistance. here is the command I used and it works:

sudo ./configure --prefix=/opt/php5.2 --with-config-file-path=/opt/php5.2 --with-mysql --with-libdir=/lib/x86_64-linux-gnu

这篇关于在/usr下找不到libmysqlclient.在Ubuntu 12.4上从源代码构建PHP 5.2时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆