http://blog.csdn.net/wallwind/article/details/7580659

错误信息: error while loading shared libraries: libXXX.so.11.1: cannot open shared object file: No such file or directory

locate libXXX.so.1.2.3

(如果你的文件系统比以前有了变化,如安装了可能是需要的库的开发包,则需要 locate -u 一下)

  • libXXX.so.1.2.3的确存在,就把libXXX.so.1.2.3所在的目录加入到 /etc/ld.so.conf 中,或者在/etc/ld.so.conf.d/ 下新建一文件,如XXX.conf ,其内容是libXXX.so.1.2.3所在的目录。
    libXXX.so.1.2.3不存在,你可能没安装包含库的程序。一般google一下“XXX linux”就能找到相应的软件。
  • 如果提示是error while loading shared libraries: libXXX.so,但你的系统上有libXXX.so.5,你可以为libXXX.so.5 做一个软链接 ln -s libXXX.so.5 libXXX.so

如,我执行一个ACE开发包中的样例程序时,出现以下提示:
./logging_app: error while loading shared libraries: libACE.so.5.4.7: cannot open shared object file: No such file or directory

[root@lf ld.so.conf.d]# locate libACE.so.5.4.7
/opt/ace/ace/libACE.so.5.4.7
/opt/ace/lib/libACE.so.5.4.7
[root@lf ld.so.conf.d]# vi ace.conf
//ace.conf中只有一行: /opt/ace/lib
ldconfig

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
  • 2021-05-30
  • 2021-12-22
猜你喜欢
  • 2021-07-24
  • 2021-07-08
  • 2021-10-11
  • 2021-09-08
相关资源
相似解决方案