yum--AttributeError: 'module' object has no attribute 'HTTPSHandler'

简介:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[root@localhost ~]# yum list
Traceback (most recent call last):
   File "/usr/bin/yum", line 4, in ?
     import yum
   File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 50, in ?
     import config
   File "/usr/lib/python2.4/site-packages/yum/config.py", line 27, in ?
     from parser import ConfigPreProcessor
   File "/usr/lib/python2.4/site-packages/yum/parser.py", line 3, in ?
     import urlgrabber
   File "/usr/lib/python2.4/site-packages/urlgrabber/__init__.py", line 53, in ?
     from grabber import urlgrab, urlopen, urlread
   File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 412, in ?
     import keepalive
   File "/usr/lib/python2.4/site-packages/urlgrabber/keepalive.py", line 339, in ?
     class HTTPSHandler(KeepAliveHandler, urllib2.HTTPSHandler):
AttributeError: 'module' object has no attribute 'HTTPSHandler'

以上问题是没有安装openssl原因,yum不能用。

7736309ab08cd7d492aa497c3376399c.jpg-wh_

安装openssl的rpm相关包,问题就可以解决。


注:如果大家在需要升级openssl或是openssh切记不要先卸载掉老的openssl,不然远程无法登录,也无法用yum命令的





      本文转自ling118 51CTO博客,原文链接:http://blog.51cto.com/meiling/1979449 ,如需转载请自行联系原作者



相关文章
|
30天前
|
计算机视觉 Python
解决 NoneType‘ object has no attribute ‘astype’ 问题
解决 NoneType‘ object has no attribute ‘astype’ 问题
26 0
|
5月前
|
存储 JSON 数据格式
数据集加载时报错'dict' object has no attribute 'requests‘
数据集加载时报错'dict' object has no attribute 'requests‘
107 5
|
3月前
AttributeError: 'NoneType' object has no attribute 'to_capabilities'
AttributeError: 'NoneType' object has no attribute 'to_capabilities'
361 0
|
6月前
|
Python Windows
xlrd库报错【AttributeError: ‘ElementTree‘ object has no attribute ‘getiterator‘】
xlrd库报错【AttributeError: ‘ElementTree‘ object has no attribute ‘getiterator‘】
116 0
|
3月前
AttributeError ‘NoneType‘ object has no attribute ‘to_capabilities‘
AttributeError ‘NoneType‘ object has no attribute ‘to_capabilities‘
90 0
|
4月前
|
数据采集
运行爬虫时报错AttributeError—— 'str' object has no attribute 'capabilities'
运行爬虫时报错AttributeError—— 'str' object has no attribute 'capabilities'
221 0
|
4月前
'WebDriver' object has no attribute 'find_element_by_tag_name'
'WebDriver' object has no attribute 'find_element_by_tag_name'
114 0
|
8月前
yolov7—tensorrt报错AttributeError: ‘NoneType‘ object has no attribute ‘execute_v2‘已解决。
yolov7—tensorrt报错AttributeError: ‘NoneType‘ object has no attribute ‘execute_v2‘已解决。
83 0
yolov7—tensorrt报错AttributeError: ‘NoneType‘ object has no attribute ‘execute_v2‘已解决。
|
8月前
|
PyTorch 算法框架/工具
已解决虚拟机yolov5报错:AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘
已解决虚拟机yolov5报错:AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'
205 0
已解决虚拟机yolov5报错:AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘
|
8月前
|
Python
AttributeError: 'dict' object has no attribute 'has_key'
AttributeError: 'dict' object has no attribute 'has_key'