error while loading shared libraries的解決方法
2015-07-19 18:35
316 查看
在linux下运行程序时,发现了error while loading shared libraries这种错误,一时间不知道解决办法,在网上搜索,终于解决了:
./tests: error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory
出现这类错误表示,系统不知道xxx.so放在哪个目录下,这时候就要在/etc/ld.so.conf中加入xxx.so所在的目录。
一般而言,有很多的so会存放在/usr/local/lib这个目录底下,去这个目录底下找,果然发现自己所需要的.so文件。
所以,在/etc/ld.so.conf中加入/usr/local/lib这一行,保存之后,再运行:/sbin/ldconfig –v更新一下配置即可。
./tests: error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory
出现这类错误表示,系统不知道xxx.so放在哪个目录下,这时候就要在/etc/ld.so.conf中加入xxx.so所在的目录。
一般而言,有很多的so会存放在/usr/local/lib这个目录底下,去这个目录底下找,果然发现自己所需要的.so文件。
所以,在/etc/ld.so.conf中加入/usr/local/lib这一行,保存之后,再运行:/sbin/ldconfig –v更新一下配置即可。
相关文章推荐
- Single Number
- 深入Android 【六】 —— 界面构造
- 【ci框架】ci框架中中有关file文件缓存相关的文件
- [C++ primer]类成员指针
- Linux学习日志之Linux之命令基本格式及文件处理命令
- 查找视图
- linux 进程间通信详解
- QTP 无法识别web 大全
- OpenWrt 主的发展版本号trunk MT7620N 无线驱动程序bug
- iOS Touch ID使用
- linux 文件列求和
- oracle sql命令
- 判断图是否是二分图
- JSP简明教程(四):EL表达式语言、JavaBean、Cookie、Session
- UVA 1659 Help Little Laura 帮助小劳拉 (最小费用流,最小循环流)
- 对复杂的表单进行判断
- linux 删除文件中空格
- HDU 2544 最短路(Dijkstra)
- golang标准库的学习
- STM32 I2C 总线占用问题解析