usr/bin/ld: cannot find 错误解决方法
2011-03-15 10:24
525 查看
文章出处:http://blog.csdn.net/osoon/archive/2010/04/25/5526455.aspx
通常在软件编译时出现的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.
通常在软件编译时出现的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.
相关文章推荐
- usr/bin/ld: cannot find 错误解决方法
- usr/bin/ld: cannot find 错误解决方法和 /etc/ld.so.conf
- usr/bin/ld: cannot find 错误解决方法
- usr/bin/ld: cannot find 错误解决方法
- usr/bin/ld: cannot find 错误解决方法
- usr/bin/ld: cannot find 错误解决方法
- usr/bin/ld: cannot find 错误解决方法
- 错误提示:/usr/bin/ld:can not find -lqte 的解决方法
- 解决/usr/bin/ld: cannot find *** 的错误
- 错误提示:/usr/bin/ld:can not find -lqte 的解决方法
- 错误提示:/usr/bin/ld:can not find -lqte 的解决方法
- LAMP编译:usr bin ld cannot find lltdl 错误的解决办法
- /usr/bin/ld: cannot find : No such file or directory解决
- 使用CMAKE链接外部的动态库时找不到库文件解决办法(/usr/bin/ld: cannot find lxxx)
- ubuntu 编译 /usr/bin/ld: cannot find 问题解决
- /usr/bin/ld: cannot find -l* 错误的解决方法
- 【转】linux /usr/bin/ld cannot find 解决
- 编译时遇到 /usr/bin/ld: cannot find -lxxx 错误的解决方法
- 解决Qt5 安装Opengl后依然出现/usr/bin/ld: cannot find lGL
- ubuntu 编译 /usr/bin/ld: cannot find 问题解决