linux安装了Python3.7之后, pip不好用了,报错如下:

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

在搜各种解决方案的时候,看到一篇帖子,是关于如何安装 openssl的,特意写了这边文章作为记录:


1.下载  (你也可以去官网选择你要下载的版本:官网地址

wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz

2.解压

tar zxvf openssl-1.1.1b.tar.gz

解压之后,进入目录
cd openssl-1.1.1b

3.配置安装路径(这里,设置的安装路径是  /usr/local/openssl 

./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl no-ssl2

4.编译、测试、安装(3条命令)

make
make test
make install

5.修改环境变量

cd ~
vi .bash_profile

6.添加下面的内容

export PATH=/usr/local/openssl/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/openssl/lib
export LC_ALL="en_US.UTF-8"
export LDFLAGS="-L/usr/local/openssl/lib -Wl,-rpath,/usr/local/openssl/lib"

还记得吗?    /usr/local/openssl  就是我们的安装路径。

7.让修改生效

source ~/.bash_profile

8.检查环节变量是否生效

8.检查环节变量是否生效

8.检查环节变量是否生效

export  $PATH

如果没有看到我们刚才配置的 openssl,则说明环境变量的配置有问题。

9.检查安装是否成功(下面是2个检查命令)

which openssl

openssl version

下载地址:https://www.openssl.org/source/

参考地址:https://help.dreamhost.com/hc/en-us/articles/360001435926-Installing-OpenSSL-locally-under-your-username

编译和安装openssl的更多相关文章

  1. 编译与安装 OpenSSL

    编译与安装 OpenSSL prefix 是安装目录,openssldir 是配置文件目录,另外建议安装两次,shared 作用是生成动态连接库.linux版的OpenSSL下载地址为:https:/ ...

  2. linux下包不重新编译php安装openssl 扩展

    今天在刚装好的centos上安装composer,老是报错,提示不安全的,后来发现是由于https的缘故,需要openssl,可能是开始装php的时候没有安装此扩展,网上有好多方案,一开始我认为只有重 ...

  3. Windows编译安装OpenSSL

    windows下使用vs2008中的nmake编译安装openssl的脚本build.bat: echo off & color 0A :: 项目名称 set PROJECT=openssl ...

  4. ubuntu下安装 openssl&&编译运行测试代码

    检查是否已安装 openssl: sudo apt-get install openssl 如果已安装执行以下操作:sudo apt-get install libssl-devsudo apt-ge ...

  5. Windows10下安装OpenSSL

    Windows10下安装的方法 安装环境:Windows10专业版+VS2013 工具:ActivePerl-5.22.1.2201-MSWin32-x64-299574.msi,下载地址:http: ...

  6. windows平台源码编译最新版openssl

    本文有问题,待改中................. 1.从openssl官网下载最新版openssl      https://www.openssl.org/source/ The latest ...

  7. Windows下安装openssl

    安装python类库cryptography1.6提示 build\temp.win-amd64-2.7\Release\_openssl.c(429): fatal error C1083: Can ...

  8. nginx学习(1):编译、安装、启动

    一.下载 从官网http://nginx.org/en/download.html 下载稳定版(目前最新稳定版是1.6.2) 二.解压 tar zxf nginx-1.6.2.tar.gzcd ngi ...

  9. Windows 一键安装OpenSSL

    原理:OpenSSL在github上有开源项目,我们只需要把代码克隆到本地,在本地编译一下就好了 注意事项: 1->在github上获取源码,必须要安装git for windows,网址 ht ...

随机推荐

  1. NET 特性(Attribute)

    NET 特性(Attribute) 转自 博客园(Fish) 特性(Attribute):是用于在运行时传递程序中各种元素(比如类.方法.结构.枚举.组件等)的行为信息的声明性标签. 您可以通过使用特 ...

  2. 面试官:来谈谈限流-RateLimiter源码分析

    RateLimiter有两个实现类:SmoothBursty和SmoothWarmingUp,其都是令牌桶算法的变种实现,区别在于SmoothBursty加令牌的速度是恒定的,而SmoothWarmi ...

  3. 基于WEB的网上购物系统-ssh源码

    基于WEB的网上购物系统主要功能包括:前台用户登录退出.注册.在线购物.修改个人信息.后台商品管理等等.本系统结构如下:(1)商品浏览模块:        实现浏览最新商品        实现按商品名 ...

  4. 剑指 Offer——2. 替换空格

    题目描述 请实现一个函数,将一个字符串中的每个空格替换成"%20".例如,当字符串为We Are Happy.则经过替换之后的字符串为We%20Are%20Happy. 思路与实现 ...

  5. Mac破解百度云

    https://github.com/CodeTips/BaiduNetdiskPlugin-macOS

  6. Mybatis插入实体类字段为关键字解决方案

    1. Mybatis插入实体类字段为关键字解决方案 1.1. 前言 可能你插入字段为关键字时报如下错误,且字段名不适合改变 You have an error in your SQL syntax; ...

  7. getopt、getopt_long命令参数

    参数 optstring为选项字符串.如果选项字符串里的字母后接着冒号":",则表示还有相关的参数 getopt int getopt(int argc, char * const ...

  8. Unix/Linux/Mac os下 文件互传

    说起文件互传,就不得不提命令scp. 他是Secure copy的缩写,使用ssh连接和加密方式, 如果两台机器之间配置了ssh免密登录, 那在使用scp的时候可以不用输入密码.  scp 和 cp ...

  9. PL/SQL Developer报错 ORA-12154:tns:could not resolve the connect identifier specified

    PL/SQL Developer使用预先配置数据库报错 ORA-12154:tns:could not resolve the connect identifier specified. 情况描述:我 ...

  10. C# Winform ProgressBar+Labe 联动显示进度

    private void btnCount_Click(object sender, EventArgs e) { label1.Visible=true; progressBar.Visible = ...