error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or
生活随笔
收集整理的這篇文章主要介紹了
error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
原文:http://blog.csdn.net/david_xtd/article/details/7625626/
鏈接時可以通過-L和-l來指定自己的庫,因此鏈接可以通過,但是運行時,系統(tǒng)仍無法找到指定的庫,需要簡單配置一下。
解決方法:
可以直接在將自己的庫所在路徑添加到/etc/ld.so.conf文件中。但一般這個文件中的內容都是一句“include /etc/ld.so.conf.d/*.conf”,因此最好在/etc/ld.so.conf.d/目錄下新建一個文件 , 如“xxx.conf”,然后將自己的庫所在路徑添加到這個conf文件中。
修改完文件后,以root身份運行 /sbin/ldconfig -v 。這一步必不可少,別丟了。
這時重新運行自己的程序,就沒有問題了。
總結
以上是生活随笔為你收集整理的error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Python: How to impor
- 下一篇: lmdb 安装