主题 : error while loading shared libraries的解決方法
有钱安装正版,没钱使用原版;远离论坛糙版;不买地摊盗版。
级别: 七朵秋菊
UID: 32943
精华: 0
发帖: 10160
威望: 21387 点
无痕币: 2623 WHB
贡献值: 0 点
在线时间: 5047(时)
注册时间: 2008-05-26
最后登录: 2022-04-11

0 error while loading shared libraries的解決方法

在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更新一下配置即可。
Total 0.046185(s) query 3, Time now is:05-16 10:42, Gzip enabled 粤ICP备07514325号-1
Powered by PHPWind v7.3.2 Certificate Code © 2003-13 秋无痕论坛