引用自Ren-Huan's Blog

執行程式時,如此遇到像下列這種錯誤: 

./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這個目錄下,所以在/etc/ld.so.conf中加入/usr/local/lib這一行,可以解決此問題。

文章標籤
全站熱搜
創作者介紹
創作者 nsysumis94 的頭像
nsysumis94

Nightmare的胡言亂語

nsysumis94 發表在 痞客邦 留言(0) 人氣(5,804)