我刚刚格式化了我的笔记本电脑并全新安装了 Ubuntu 18.04。在安装我的一些开发包时,我发现使用 rubygems 和 python pip 都有问题。它给出了与 SSL 相关的错误。我也无法访问他们的网站。(连接重置错误消息)
这是安装最新版本 PIP 的错误
Connected to bootstrap.pypa.io (2a04:4e42::175) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
} [5 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
} [215 bytes data]
* TLSv1.2 (IN), TLS handshake, Server hello (2):
{ [112 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [3805 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [300 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [37 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to bootstrap.pypa.io:443
* stopped the pause stream!
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
* Closing connection 0
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to bootstrap.pypa.io:443
和红宝石:
gem update --system
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://api.rubygems.org/specs.4.8.gz)
编辑:
我什至无法使用 curl 连接到 curl 网站:
➜ curl -v https://curl.haxx.se/mail/archive-2015-08/0015.html
* Trying 2a04:4e42::561...
* TCP_NODELAY set
* Connected to curl.haxx.se (2a04:4e42::561) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to curl.haxx.se:443
* stopped the pause stream!
* Closing connection 0
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to curl.haxx.se:443
我试图更新 openssl 和 ca-certificates 包,但同样的问题。 Openssl 版本: OpenSSL 1.1.0g 2017 年 11 月 2 日
有人知道发生了什么吗?这在几天前的虚拟机中并没有发生。
编辑在连接到同一网络并以相同方式配置的 VM 中再次测试,它可以正常工作!!真的很奇怪。
谢谢你。
我通过在我的机器上禁用 ipv6 解决了这个问题。真的不知道为什么,但它的工作。
要在 Ubuntu 或 Linux Mint 上禁用 ipV6,请遵循本教程: https: //support.purevpn.com/how-to-disable-ipv6-linuxubuntu
在网络管理器中禁用是不够的。