打開/etc/ld.so.conf文件在其后面添加鏈接查找路徑:/usr/local/lib(或其他庫所在路徑),為了啟用該配置在終端輸入ldconfig。
今天安裝codeblocks就遇到了這個問題,庫在/usr/lib下,不加上這個配置始終提示:
./codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory
加上后問題解決!~