Linux中報庫或者程式找不到的解決方案

來源:互聯網
上載者:User

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

 

    另外,/usr/local/bin是不是預設的路徑,使用

    echo $PATH  查看一下。   一般使用者和root可能不同。

    如果PATH中沒有包括我們需要的路徑,那麼在/etc/profiler檔案中加入

    PATH=$PATH:/usr/local/bin

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.