当前位置:Gxlcms > linux教程 > Linux执行程序时提示error while loading shared怎么办?

Linux执行程序时提示error while loading shared怎么办?

时间:2021-07-01 10:21:17 帮助过:14人阅读

  Linux在执行某些程序的时候,居然出现了error while loading shared libraries错误提示,相信很多朋友都有遇到这个问题,其实这个问题不难解决,随小编一起来了解下吧。

Linux执行程序时提示error while loading shared怎么办?

  解决方法:

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

  上面就是Linux执行程序时提示error while loading shared libraries的解决方法,如果你遇到了一样的问题,可在/etc/ld.so.conf中加入xxx.so所在的目录,再更新下配置。

人气教程排行