如何在Ubuntu中将OpenSSL从1.0.2g升级到1.1.0g并让python识别新的OpenSSL [英] How to upgrade OpenSSL from 1.0.2g to 1.1.0g in Ubuntu and let python recognize the new OpenSSL

查看:410
本文介绍了如何在Ubuntu中将OpenSSL从1.0.2g升级到1.1.0g并让python识别新的OpenSSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Ubuntu 16.04.它具有OpenSSL 1.0.2g.我需要使用OpenSSL 1.1.0g.请注意,OpenSSL 1.1.0g已安装在我的另一台计算机Ubuntu 18中.但是我需要在Ubuntu 16.04中运行python程序,但是我需要特定的OpenSSL 1.1.0g.我做到了:

I have Ubuntu 16.04. It has OpenSSL 1.0.2g. I need to use OpenSSL 1.1.0g. Note that OpenSSL 1.1.0g is installed in my other machine Ubuntu 18. But I need to run a python program in Ubuntu 16.04 but I need the specific OpenSSL 1.1.0g. I did:

sudo apt-get upgrade
sudo apt-get update

但是我的Ubuntu机器中的OpenSSL没有更新.我该如何更新?

But OpenSSL in my Ubuntu machine did not get updated. How can I update it?

我使用python socket, ssl模块在端口443中建立TLS连接.如果将旧的OpenSSL 1.0.2g更新为OpenSSL 1.1.0g,python会自动识别OpenSSL 1.1.0g吗?

I use python socket, ssl modules to make TLS connection in port 443. Will python automatically recognizes OpenSSL 1.1.0g if I updated the old OpenSSL 1.0.2g to OpenSSL 1.1.0g?

升级OpenSSL的原因是我需要运行python程序ssl socket,但是我需要该程序才能使用OpenSSL 1.1.0g.

The reason for upgrading OpenSSL is I need to run python program ssl socket but I need the program to use OpenSSL 1.1.0g.

当我尝试时:

sudo apt-get install openssl

并通过以下方式检查OpenSSL版本:openssl version -a 我得到的是旧版本OpenSSL 1.0.2g

and checks the OpenSSL version via: openssl version -a I get the old version OpenSSL 1.0.2g

请问如何在我的Ubuntu 14.06机器上获取新版本OpenSSL 1.1.0g?

How to get the new version OpenSSL 1.1.0g in my Ubuntu 14.06 machine please?

推荐答案

为什么仅通过更新就无法在Ubuntu 16.04上运行OpenSSL 1.1.0g:

您的Ubuntu 18具有OpenSSL 1.1.0g,因为其存储库中有可用的版本.有时,它在存储库系统上有一个以上版本的软件包.但是,看来Ubuntu 16.04根本没有您需要的版本.这就是为什么不是这样,并且仅通过更新就无法使OpenSSL 1.1.0gUbuntu 16.04上工作的原因.存储库中可用的版本是不同.

Your Ubuntu 18 has OpenSSL 1.1.0g because the version that is available on its repositories. Sometimes, it has more than one version of a package available on the repository system. But, it looks like Ubuntu 16.04 does not have the version you need available at all. That is why you weren't and you won't be able to get OpenSSL 1.1.0g working on Ubuntu 16.04 by just updating. The version available on the repositories is different.

以及操作方法:

您将需要手动安装它,或者找到Ubuntu 16.04的存储库,该存储库使OpenSSL 1.1.0g在系统上可用.我不确定是否有可用的存储库,因此,如果要手动安装它,请按以下步骤操作:

You either will need to install it manually or find a repository for Ubuntu 16.04 that make OpenSSL 1.1.0g available on the system. I am not sure there is a repository available, so if you want to install it manually do as it follows:

wget https://www.openssl.org/source/old/1.1.0/openssl-1.1.0g.tar.gz
tar xzvf openssl-1.1.0g.tar.gz
cd openssl-1.1.0g
./config
make
sudo make install

openssl version -a

就是这样!

警告 .:默认情况下,通过安装系统中不可用的OpenSSL新版本,您引入的版本与系统维护中可用的更新不兼容. .您将需要自己照顾它.也许,根据您的情况而定,值得使用Ubuntu 18,它具有默认情况下所需的OpenSSL版本.这是最简单,最安全的方法.

Warning.: By installing a new version of OpenSSL that is not available in the system, by default, you introduced a version that is not compatible with the updates made available by the maintenance of the system. You will need to take care of it yourself. Maybe, depending on your scenario, it is worth your while just use Ubuntu 18 that has the version of OpenSSL you need by default. It is the easiest and safest way to go.

希望一切顺利. 祝你好运!

Hope everything goes well. Good luck!

这篇关于如何在Ubuntu中将OpenSSL从1.0.2g升级到1.1.0g并让python识别新的OpenSSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆