解决编译时出现的usr/bin/ld: cannot find -lxxx的错误
2013-12-04 13:55
836 查看
参考:http://blog.siyebocai.cn/20100324_5p424qs7.html
通常在软件编译时出现的usr/bin/ld: cannot find -lxxx的错误,主要的原因是库文件并没有导入的ld检索目录中。
解决方式:
1。确认库文件是否存在,比如-l123, 在/usr/lib, /usr/local/lib,或者其他自定义的lib下有无lib123.so, 如果只是存在lib123.so.1,
那么可以通过ln -sv lib123.so.1 lib123.so,建立一个连接重建lib123.so.
2。检查/etc/ld.so.conf中的库文件路径是否正确,如果库文件不是使用系统路径,/usr/lib, /usr/local/lib, 那么必须在文件中加入。
3。ldconfig 重建ld.so.cache文件,ld的库文件检索目录存放文件。尤其刚刚编译安装的软件,必须运行ldconfig,才能将新安装的
库文件导入ld.so.cache.
4。测试,gcc -l123 --verbose.
(转自http://blog.csdn.net/osoon/article/details/5526455)
通常在软件编译时出现的usr/bin/ld: cannot find -lxxx的错误,主要的原因是库文件并没有导入的ld检索目录中。
解决方式:
1。确认库文件是否存在,比如-l123, 在/usr/lib, /usr/local/lib,或者其他自定义的lib下有无lib123.so, 如果只是存在lib123.so.1,
那么可以通过ln -sv lib123.so.1 lib123.so,建立一个连接重建lib123.so.
2。检查/etc/ld.so.conf中的库文件路径是否正确,如果库文件不是使用系统路径,/usr/lib, /usr/local/lib, 那么必须在文件中加入。
3。ldconfig 重建ld.so.cache文件,ld的库文件检索目录存放文件。尤其刚刚编译安装的软件,必须运行ldconfig,才能将新安装的
库文件导入ld.so.cache.
4。测试,gcc -l123 --verbose.
(转自http://blog.csdn.net/osoon/article/details/5526455)
相关文章推荐
- opencv-3.1.0在Ubuntu系统上使用g++编译时出现“/usr/bin/ld: cannot find -lippicv ” 错误及其解决办法
- linux/在软件编译时出现usr/bin/ld: cannot find -lxxx的错误
- 解决编译代码出现/usr/bin/ld: cannot find -luuid错误 .
- 解决编译代码出现/usr/bin/ld: cannot find -luuid错误 .
- 解决编译代码出现/usr/bin/ld: cannot find -luuid错误 .
- ubuntu下安装Qt时,编译时出现”/usr/bin/ld: cannot find -LXXX” 错误
- 编译时遇到 /usr/bin/ld: cannot find -lxxx 错误的解决方法
- Qt5.2编译时出现"/usr/bin/ld: cannot find -lxxx" 错误
- Android编译遇到错误/usr/bin/ld: cannot find -lstdc++的解决
- 在编译安装程序时候遇到/usr/bin/ld: cannot find -lxxx的时候的解决办法。
- /usr/bin/ld: cannot find -lxxx 错误解决
- 错误-解决/usr/bin/ld: cannot find -lxxx 问题
- 关于usr/bin/ld: cannot find -lxxx问题总结(Qt编译错误cannot find -lGL)
- Android编译遇到错误/usr/bin/ld: cannot find -lstdc++的解决
- Linux系统中提示/usr/bin/ld: cannot find -lxxx错误的通用解决方法
- 【转】链接任意目录下库文件(解决错误“/usr/bin/ld: cannot find -lxxx”
- 解决/usr/bin/ld: cannot find -luuid编译错误
- 编译Android出现/usr/bin/ld: cannot find -lncurses错误
- Qt常见make编译错误:/usr/bin/ld:cannot find -lxxx
- 解决g++编译出现/usr/bin/ld: cannot find -lc