歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux管理 >> Linux維護 >> Linux執行程序時提示error while loading shared怎麼辦?

Linux執行程序時提示error while loading shared怎麼辦?

日期:2017/3/2 10:29:00   编辑:Linux維護

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

上面就是Linux執行程序時提示error while loading shared libraries的解決方法,如果你遇到了一樣的問題,可在/etc/ld.so.conf中加入xxx.so所在的目錄,再更新下配置。

Copyright © Linux教程網 All Rights Reserved