使用LD_LIBRARY_PATH變數 如:當運行scp時出現以下提示: scp: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory那麼 ...
使用LD_LIBRARY_PATH變數
如:當運行scp時出現以下提示:
scp: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
那麼直接執行export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/ssd/lib (筆者的libz.so.1庫在/mnt/ssd/lib路徑下)
註意:如果一個程式需要載入多個動態庫,而且每個庫的路徑不一樣,如上炮製即可解決找不到庫的問題