类似/usr/bin/ld: cannot find -xxxx的错误有很多, 首先我们可以最简单的判断一下:

这类情况一般是由于缺乏某某库文件, 又或者可能是由于已存在的库问题版本不对造成的

一般都是解决的办法就是安装缺乏的devel包就可以解决, 当然还有其他的未知因素, 我们看一个实例:

我在一台装centos5.2 x86_64的系统上配置php环境, 提示这个错误

/usr/bin/ld: cannot find -lmysqlclien

于是我安装了

#  yum -y install mysql-devel

结果提示依旧, 我根据提示查看config.log

/usr/bin/ld: skipping incompatible /usr/local/mysql/lib/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/local/mysql/lib/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient

她还是去找/usr/local/mysql/lib/libmysqlclient.so, 我来把这个错的换成对了, 刚才装了mysql-devel, 那么在/usr/lib64下就多了一个mysql的目录

# cd /usr/local/mysql
# mv lib lib.bak
# ln -s /usr/lib64/mysql /usr/local/mysql/lib (给他做个软链接)

然后再次编译安装php, 一切正常!

解决/usr/bin/ld: cannot find -lmysqlclient错误的更多相关文章

  1. /usr/bin/ld: cannot find -lc错误原因及解决方法

    问题解决 我在执行如下命令的时候,出现了错误. gcc -o main main.c -static -L. –lmylib Linux环境下gcc静态编译/usr/bin/ld: cannot fi ...

  2. ubuntu中解决/usr/bin/ld: cannot find -lxxx

    解决/usr/bin/ld: cannot find -lxxx 在linux环境编译应用程式或lib的source code时常常会出现如下的错误讯息:/usr/bin/ld: cannot fin ...

  3. make源文件时出现 /usr/bin/ld: cannot find -lstdc++ 错误

    解决CentOS 7 中,make源文件时出现 /usr/bin/ld: cannot find -lstdc++ 错误 在CentOS 7中,使用static方法编译,需要安装static vers ...

  4. Linux系统中提示/usr/bin/ld: cannot find -lxxx错误的通用解决方法

    在linux环境编译应用程式或lib的source code时常常会出现如下的错误讯息: 代码如下: /usr/bin/ld: cannot find -lxxx 这些讯息会随着编译不同类型的sour ...

  5. 系统中提示未找到/usr/bin/ld: cannot find -lxxx错误的通用解决方法

    在linux环境编译应用程式或lib的source code时常常会出现如下的错误讯息: 代码如下: /usr/bin/ld: cannot find -lxxx 这些讯息会随着编译不同类型的sour ...

  6. [转载]解决/usr/bin/ld: cannot find -lxxx

    在linux环境编译应用程式或lib的source code时常常会出现如下的错误讯息: /usr/bin/ld: cannot find -lxxx 这些讯息会随着编译不同类型的source cod ...

  7. 解决/usr/bin/ld: cannot find -lssl

    一般情况下,-lssl表示要寻找库 libssl.so, 而上面的错误表示ld找不到这个库,一般情况下,原因是系统中没有安装这个库,只要安装就好了. 可以先使用sudo apt-cache searc ...

  8. 关于usr/bin/ld: cannot find -lxxx问题总结

    /usr/bin/ld: cannot find -lxxx问题总结   linux下编译应用程序常常会出现如下错误:     /usr/bin/ld: cannot find -lxxx       ...

  9. 【转】关于usr/bin/ld: cannot find -lxxx问题总结

    原文网址:http://eminzhang.blog.51cto.com/5292425/1285705 /usr/bin/ld: cannot find -lxxx问题总结   linux下编译应用 ...

随机推荐

  1. CSS环绕球体的旋转文字-3D效果

    代码地址如下:http://www.demodashi.com/demo/12482.html 项目文件结构截图 只需要一个html文件既可: 项目截图: 代码实现原理: 该示例的实现过程很简单,主要 ...

  2. oracle 客户端连接

    客户端安装时选择管理员模式安装. 连接配置: 首先找到:\app\Administrator\product\11.2.0\client_1\network\admin 文件夹下  tnsnames. ...

  3. React学习之redux

    在阅读本文之前,希望大家对以下知识点能提前有所了解并且上好厕所(文章有点长): 状态提升的概念 react高阶组件(函数) es6基础 pure 组件(纯函数) Dumb 组件 React.js的co ...

  4. RF--- selenium

  5. 上门洗车APP --- Androidclient开发 之 网络框架封装介绍(二)

    上门洗车APP --- Androidclient开发 之 网络框架封装介绍(二) 前几篇博文中给大家介绍了一下APP中的基本业务及开发本项目使用的网络架构: 上门洗车APP --- Androidc ...

  6. python升级或者其他原因把yum搞坏了

    第一个命令查询出来,原本是安装的啥版本 rpm -qa | grep python- | grep 2.6 然后执行下一个命令,就可以安装原本的python版本了,注意链接要换成你对应的那个版本 rp ...

  7. CentOS系统环境下安装MongoDB

    (1)进入MongoDB下载中心:http://www.mongodb.org/downloads We recommend using these binary distributions (官方推 ...

  8. Tiny语言编译器简单介绍

    1.简单介绍:编译器是将一种语言翻译成还有一种语言的程序.编译器将源程序的代码作为输出,从而产生用目标语言编写的等价程序.比如源码为C/C++等高级语言,那么目标语言就是目标机器的机器代码.也就是能够 ...

  9. activemq 安装-单点

    一,准备工作:首先安装jdk1.7及其以上版本,此环境安装的是jdk-1.8   二.搭建activemq 环境:  192.168.9.25         centos6.5            ...

  10. Python 深入剖析SocketServer模块(二)(V2.7.11)

    五.Mix-In混合类 昨天介绍了BaseServer和BaseRequestHandler两个基类,它们只用与派生,所以贴了它们派生的子类代码. 今天介绍两个混合类,ForkingMix-In 和 ...