ubuntu18.04 坑之杂集

导航:
1.python ValueError: SSL support not available


1.python ValueError: SSL support not available

参考:SSL support not available, Ubuntu 18.04, ppa repository
在添加ppa源时,提示

File "/usr/lib/python3.6/urllib/request.py", line 210, in urlopen
    raise ValueError('SSL support not available')
ValueError: SSL support not available

但实际上已经安装过openssl。

tu@tu:~$ dpkg -l|grep openssl
ii  openssl                                       1.1.1-1ubuntu2.1~18.04.5                         amd64        Secure Sockets Layer toolkit - cryptographic utility
ii  openssl1.0                                    1.0.2n-1ubuntu5.3                                amd64        Secure Sockets Layer toolkit 1.0 - cryptographic utility
ii  perl-openssl-defaults:amd64                   3build1                                          amd64        version compatibility baseline for Perl OpenSSL packages
ii  python-openssl                                17.5.0-1ubuntu1                                  all          Python 2 wrapper around the OpenSSL library
tu@tu:~$ which openssl
/usr/bin/openssl

另:openssl 安装:sudo apt install openssl libssl-dev
安装了,系统却没法发现。
根据网友的解决方法,原因是/usr/local/bin/usr/local/lib下的个人版openssl干扰了系统的openssl,导致系统发现不了安装的openssl,删除个人版openssl即可:

sudo rm /usr/local/bin/openssl*
sudo rm /usr/local/lib/libssl*

问题解决。

你可能感兴趣的:(ubuntu18.04 坑之杂集)