Chinaunix首页 | 论坛 | 博客
  • 博客访问: 168286
  • 博文数量: 39
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 214
  • 用 户 组: 普通用户
  • 注册时间: 2014-04-21 11:10
文章分类

全部博文(39)

文章存档

2017年(6)

2016年(1)

2015年(6)

2014年(26)

我的朋友

分类: C/C++

2015-03-07 10:21:36

原文地址:
 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这个目录下,所以在/etc/ld.so.conf中加入/usr/local/lib这一行,可以解决此问题。
将/etc/ld.so.conf存档后,还要执行「/sbin/ldconfig –v」来更新一下才会生效。

阅读(2225) | 评论(0) | 转发(0) |
0

上一篇:late_initcall

下一篇:tcp socket 网线断开判断

给主人留下些什么吧!~~