微信关注,获取更多

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

  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所在的目录,再更新下配置。

未经允许不得转载:系统吧-电脑系统大神 » Linux执行程序时提示error while loading shared怎么办?

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏