yum安装报错 sslv3
作者:互联网
具体报错信息:M2Crypto.SSL.SSLError: sslv3 alert handshake failure
本来想直接错误信息做标题,后来发现长度不允许。
今天一台服务器磁盘IO有些异常,于是安装iotop工具进行查看,发现安装报错。
部分具体报错信息:
File "/usr/lib64/python2.4/urllib2.py", line 358, in open response = self._open(req, data) File "/usr/lib64/python2.4/urllib2.py", line 376, in _open '_open', req) File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain result = func(*args) File "/usr/lib64/python2.4/site-packages/M2Crypto/m2urllib2.py", line 82, in https_open h.request(req.get_method(), req.get_selector(), req.data, headers) File "/usr/lib64/python2.4/httplib.py", line 810, in request self._send_request(method, url, body, headers) File "/usr/lib64/python2.4/httplib.py", line 833, in _send_request self.endheaders() File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders self._send_output() File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output self.send(msg) File "/usr/lib64/python2.4/httplib.py", line 652, in send self.connect() File "/usr/lib64/python2.4/site-packages/M2Crypto/httpslib.py", line 47, in connect self.sock.connect((self.host, self.port)) File "/usr/lib64/python2.4/site-packages/M2Crypto/SSL/Connection.py", line 174, in connect ret = self.connect_ssl() File "/usr/lib64/python2.4/site-packages/M2Crypto/SSL/Connection.py", line 167, in connect_ssl return m2.ssl_connect(self.ssl, self._timeout) M2Crypto.SSL.SSLError: sslv3 alert handshake failure
查看了一会,本来以为是缺少证书或者是模块,但是yum不能用了,python升级也不管用,yum还是需要指向原来的老的python版本。
于是按照 M2Crypto.SSL.SSLError: sslv3 alert handshake failure来搜索一下看看有没有收获。大部分都是关于使用requests模块或者是urllib2模块进行操作的时候,网站sslv3证书被禁用的原因导致的。但是yum的情况不是很多。
偶然发现了一篇 https://blog.csdn.net/aoerqileng/article/details/90545553 文章,跟我的情况一样。
原来是repo仓库里添加的地址有问题
[saltstack-repo] name=SaltStack repo for RHEL/CentOS $releasever baseurl=https://repo.saltstack.com/yum/redhat/$releasever/$basearch/latest enabled=1 gpgcheck=1 gpgkey=https://repo.saltstack.com/yum/redhat/$releasever/$basearch/latest/SALTSTACK-EL5-GPG-KEY.pub
之前添加的saltstack的仓库现在出现了问题,可能是saltstack官方仓库禁止了sslv3的原因导致。
将saltstack的仓库注释掉
cd /etc/yum.repo.d/ mv saltstack-rhel5.repo saltstack-rhel5.repo.bak
然后yum就能正常执行了。
标签:self,py,python2.4,yum,usr,sslv3,报错,lib64,line 来源: https://blog.51cto.com/zhuyuanpo/2424358