Ubuntu 16.04 安装openssl 指定版本

一下步骤安装的是openssl 1.0.2g版本,如果要安装其他版本只需要替换1.0.2g到指定版本,例如1.1.0l

1. sudo apt-get install make (Install compiling library Make)

2. wget https://www.openssl.org/source/openssl-1.0.2g.tar.gz (Download the latest OpenSSL 1.0.2g 源代码)

3. tar -xzvf openssl-1.0.2g.tar.gz (Extract the tar ball to the local directory)

4. cd openssl-1.0.2l (Enter extracted OpenSSL directory)

5. sudo ./config (Configure binaries for compiling)

6. sudo make install (install configured binaries)

7. sudo ln -sf /usr/local/ssl/bin/openssl `which openssl` (This will create a sym link to the new binaries), 这一步可能失败,替换 ‘which openssl’ 为 /usr/local/bin/openssl 再试一次

8. openssl version -v (Used to check the version of the Current OpenSSL binaries)

原文地址:https://www.cnblogs.com/shengguang/p/11044899.html