美文网首页
Ubuntu+OpenSSL安装+not found (requ

Ubuntu+OpenSSL安装+not found (requ

作者: 一颗老鼠屎 | 来源:发表于2019-01-18 14:58 被阅读0次

    下载地址:https://www.openssl.org/source/openssl-1.1.1a.tar.gz

    下载后解压,解压目录这里是~/software/

     tar -zxvf openssl-1.1.1a.tar.gz -C ~/software/
    

    进入解压目录下软件的根目录:

    cd ~/software/openssl-1.1.1a/
    
    sudo ./config
    
    sudo make && sudo make install
    

    编译安装完成后,查看版本:

    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

    然后查看版本:

    feng@FZ:~/software/openssl-1.1.1a$ openssl version
    OpenSSL 1.1.1a  20 Nov 2018
    

    完成!

    参考

    需翻墙
    OPENSSL_1_1_1' not found报错参考:https://github.com/openssl/openssl/issues/5845

    相关文章

      网友评论

          本文标题:Ubuntu+OpenSSL安装+not found (requ

          本文链接:https://www.haomeiwen.com/subject/tbjndqtx.html