日期:2014-05-16  浏览次数:20753 次

Linux下出现error while loading shared libraries错误。

装了datastage,在启动服务器shell的时候,出现

error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory错误。

?

.so.x是动态运行库,后面的数字是版本号。


出现这类错误表示,系统不知道xxx.so放在哪个目录下,这时候就要在/etc/ld.so.conf中加入xxx.so所在的目录。
一般而言,有很多的so会存放在/usr/local/lib这个目录底下,

或者使用命令"find / -name xxx.so"来查找此文件。
所以,在/etc/ld.so.conf中加入此文件指定路径,如"/usr/local/lib"这一行,

保存之后,再运行:/sbin/ldconfig –v更新一下配置即可。