我有Ubuntu 16.04
。它有OpenSSL 1.0.2g
。我需要使用OpenSSL 1.1.0g
。请注意,我的另一台机器Ubuntu 18
中安装了OpenSSL 1.1.0g。但是我需要在Ubuntu 16.04
中运行python程序,但是我需要特定的OpenSSL 1.1.0g
。我做到了:
sudo apt-get upgrade
sudo apt-get update
但是我的Ubuntu机上的OpenSSL
没有更新。我如何更新它?
我使用python模块在443端口建立socket, ssl
连接。如果我将旧的OpenSSL 1.0.2g
更新为OpenSSL 1.1.0g
,python会自动识别OpenSSL 1.1.0g
吗
升级OpenSSL
的原因是我需要运行python程序ssl socket,但我需要该程序使用OpenSSL 1.1.0g
。
当我尝试的时候:
sudo apt-get install openssl
并通过以下方式检查OpenSSL版本:openssl version -a
I get the old version OpenSSL 1.0.2g
请告诉我如何在我的Ubuntu 14.06
机器上获取新版本的OpenSSL 1.1.0g
?
发布于 2021-05-18 22:03:47
下面是我如何从源代码安装最新版本的openssl。
# Install make and packages required to compile the source code
apt-get install -y libfindbin-libs-perl build-essential
# Download source code
wget https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_1_1_1k.tar.gz -O openssl.tar.gz
# Extract source code
tar -xf openssl.tar.gz
# Go to the source code folder
cd openssl-OpenSSL_1_1_1k
# Configure to compile it
./config --libdir=/usr/local/lib
# Compile with 4 parelel jobs
make -j 4
# Install compiled code
sudo make install
# Move older executable
sudo mv /usr/bin/openssl /usr/bin/openssl-1.0.2g
# Create soft symbolic link to the newer version of openssl
sudo ln -s /usr/local/bin/openssl /usr/bin/openssl
# Make visible the new libraries installed at /usr/local/lib
sudo ldconfig
https://stackoverflow.com/questions/51560964
复制相似问题