Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1632265
  • 博文数量: 135
  • 博客积分: 2820
  • 博客等级: 少校
  • 技术积分: 2544
  • 用 户 组: 普通用户
  • 注册时间: 2010-09-16 13:33
文章分类

全部博文(135)

文章存档

2015年(1)

2014年(8)

2013年(16)

2012年(43)

2011年(56)

2010年(11)

分类: LINUX

2011-06-07 16:37:41

行程式時,如此遇到像下列這種錯誤:

./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」來更新一下才會生效。
阅读(1116) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~