首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何在Ubuntu中将OpenSSL从1.0.2g升级到1.1.0g并让OpenSSL识别新的python

如何在Ubuntu中将OpenSSL从1.0.2g升级到1.1.0g并让OpenSSL识别新的python
EN

Stack Overflow用户
提问于 2018-07-27 23:18:32
回答 1查看 30.6K关注 0票数 13

我有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。我做到了:

代码语言:javascript
复制
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

当我尝试的时候:

代码语言:javascript
复制
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

EN

Stack Overflow用户

发布于 2021-05-18 22:03:47

下面是我如何从源代码安装最新版本的openssl。

代码语言:javascript
复制
# 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
票数 2
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51560964

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档