1. 程式人生 > >缺少動態連線庫.so--cannot open shared object file: No such file or directory

缺少動態連線庫.so--cannot open shared object file: No such file or directory

總結下來主要有3種方法:
1. 用ln將需要的so檔案連結到/usr/lib或者/lib這兩個預設的目錄下邊 ln -/where/you/install/lib/*.so /usr/lib sudo ldconfig

2.修改LD_LIBRARY_PATH

export LD_LIBRARY_PATH=/where/you/install/lib:$LD_LIBRARY_PATH sudo ldconfig

3.修改/etc/ld.so.conf,然後重新整理


vim /etc/ld.so.conf

add /where/you/install/lib

sudo ldconfig