• 1. 更新OpenSSL,OpenSSL下载地址:
    https://www.openssl.org/source/openssl-1.1.1a.tar.gz
    或者其他最新版本:https://www.openssl.org/

  • 2. 切换到下载路径下:

    cd Downloads
    tar -zxvf openssl-1.1.1a.tar.gz
    
  • 3. 进入解压目录下软件的根目录:

    cd openssl-1.1.1a
    
  • 4. 以此执行如下命令:

     sudo ./config
     sudo make && sudo make install
    
  • 验证是否成功
    当出现openssl是安装的版本表示安装成功。

    openssl version
    

    我到这一步就已经安装成功了。
    若出现以下错误:

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

    或者:

    > openssl version
    > openssl: /usr/lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by openssl)
    > openssl: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by openssl)
    
  • 解决办法:

    echo "export LD_LIBRARY_PATH=/usr/local/lib" >> ~/.bashrc
    export LD_LIBRARY_PATH=/usr/local/lib
    

    查看环境变量:

    echo $LD_LIBRARY_PATH
    

    结果:

    /usr/local/lib
    

    查看版本:

    openssl version
    

    结果

    OpenSSL 1.1.1a  20 Nov 2018
    

参考: https://www.jianshu.com/p/25126152ad27

GitHub 加速计划 / ope / openssl
25.13 K
9.99 K
下载
传输层安全性/安全套接层及其加密库
最近提交(Master分支:1 个月前 )
fd39d1c8 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/25095) 3 个月前
ae87c488 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/25095) 3 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐