解決:error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No

解決:error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No

1、問題

  • 尤其是源碼安裝完OpenSSL後,執行openssl version命令
  • 啓動web服務器的時候,如nginx
  • 以後操作後就會出現error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No

2、原因

  • 執行ldd + 程序、可執行文件的絕對路徑命令,你就會發現,是因爲找不到庫的位置造成的
ldd /usr/local/openssl/bin/openssl

這裏寫圖片描述

3、解決辦法

  • 使用root用戶操作
ln -s /usr/local/lib/libssl.so.1.1 /usr/lib/libssl.so.1.1
ln -s /usr/local/lib/libcrypto.so.1.1 /usr/lib/libcrypto.so.1.1
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章