2017-09-02 83 views
-1

我有一個新的Linux安裝(Ubuntu Mini Remix 16.04),我做了以下內容:無法運行新編譯的OpenSSL

sudo apt-get install build-essential 
sudo apt-get install git 
git clone https://github.com/openssl/openssl.git 
cd openssl 
./config --openssldir=/usr/local/ssl 
make 
make test 
sudo make install 

然後我在openssl鍵入CLI並得到這個消息:

openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory 
+0

Stack Overflow是一個用於編程和開發問題的網站。此問題似乎是無關緊要的,因爲它不是有關編程或開發的信息,請參閱幫助中心的[我可以詢問哪些主題](http://stackoverflow.com/help/on-topic)。也許[超級用戶](http://superuser.com/)或者[Unix&Linux Stack Exchange](http://unix.stackexchange.com/)會是一個更好的地方。 – jww

回答

1

也許/ usr/local/lib不在/etc/ld.so.conf中?如果只是嘗試以root身份運行「ldconfig」而不帶參數,如果不是隻添加它並運行「ldconfig」。

0

試試這個: 做「哪openssl」來確認你正在看正確的副本。做「ldd openssl」來獲得它所期望的動態庫列表。鑑於你得到的錯誤,在LDD輸出中應該有一個錯誤,表明它找不到libssl.so。

您的「make install」可能已經簡單地忽略了「ldconfig」。執行「ldconfig」讓系統刷新共享庫的位置信息(從/etc/ld.so.conf和/etc/ld.so.conf.d/獲取該信息)

您可以使用LD_LIBRARY_PATH環境變量強制它使用某個目錄搜索共享庫,這通常會修復此錯誤。