error while loading shared libraries的解決方法
生活随笔
收集整理的這篇文章主要介紹了
error while loading shared libraries的解決方法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在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更新一下配置即可。
? ? ?本文轉自 驛落黃昏 51CTO博客,原文鏈接:http://blog.51cto.com/yiluohuanghun/866300,如需轉載請自行聯系原作者
與50位技術專家面對面20年技術見證,附贈技術全景圖
總結
以上是生活随笔為你收集整理的error while loading shared libraries的解決方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 数据库多表连接查询详解
- 下一篇: layer.open增添模板效果母页面