Chinaunix首页 | 论坛 | 博客
  • 博客访问: 129035
  • 博文数量: 40
  • 博客积分: 2228
  • 博客等级: 大尉
  • 技术积分: 335
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-12 11:48
文章分类

全部博文(40)

文章存档

2011年(11)

2010年(29)

我的朋友

分类: LINUX

2011-03-17 11:33:14

在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更新一下配置即可。


本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/dumeifang/archive/2008/09/22/2963223.aspx

 

阅读(1428) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~