Loading

阿里云服务器安装python3.7.3,解决openssl问题

一、下载python3.7.3版本的压缩包

官方地址:http://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz

二、安装

下载完成后解压,进入Python-3.7.3文件夹
挨个执行以下三个操作

./configure
make
make install

在执行make过程中会出现很多问题,这些问题一定要一一排查解决,例如:

仔细看警告或者错误的提示,安装缺少的工具(本人展示的是在centos系统上安装,若在ubuntu上使用apt-get命令,包名称自行百度)

yum install ncurses-devel
yum install libuuid-devel
yum install -y zlib zlib-devel
yum install sqlite-devel
yum install readline-devel
yum install tkinter
yum -y install tcl-devel tk-devel
yum install lzma
yum install libgdbm-dev
yum install xz-devel

参考链接:https://www.cnblogs.com/bigriverx/p/8743008.html

在安装过程中会有这个重点问题:

Could not build the ssl module!
Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host().
LibreSSL 2.6.4 and earlier do not provide the necessary APIs, https://github.com/libressl-portable/portable/issues/381

意思是:python与目前系统上的openssl不兼容,只兼容OpenSSL 1.0.2版本或1.1以上版本的 libssl
具体为什么高版本要用到libssl 是因为openssl的漏洞问题,感兴趣的朋友可以百度一下。
安装libressl-2.6.4以上版本的依赖模块
安装教程:https://blog.csdn.net/scorpio921/article/details/82682757
下载地址:https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.7.4.tar.gz

posted @ 2019-07-09 15:42  _尼欧`  阅读(5364)  评论(2编辑  收藏  举报