CentOS 7.0.1406上yum install提示exiting on user cancel错误的解决方法
问题
公司一台老CentOS 7机器上要安装某个软件,yum install后,提示安装失败,提示Exiting on user cancel。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
File "/usr/libexec/urlgrabber-ext-down", line 75, in <module> main() File "/usr/libexec/urlgrabber-ext-down", line 61, in main fo = PyCurlFileObject(opts.url, opts.filename, opts) File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1258, in __init__ self._do_open() File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1589, in _do_open self._do_grab() File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1723, in _do_grab self._do_perform() File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1517, in _do_perform raise KeyboardInterrupt KeyboardInterrupt
Exiting on user cancel
试了多次都是这样,一脸诧异。 查看了下CentOS版本是CentOS Linux release 7.0.1406 (Core), 网上搜一通,发现是CentOS 7.0.1406中yum的一个Bug。摘录解决方法如下。
elif errcode in (42, 55, 56): # this is probably wrong but ultimately this is what happens # we have a legit http code and a pycurl 'writer failed' code # which almost always means something aborted it from outside # since we cannot know what it is -I'm banking on it being # a ctrl-c. XXXX - if there's a way of going back two raises to # figure out what aborted the pycurl process FIXME raise KeyboardInterrupt