yum命令执行报错,File “/usr/bin/yum”, line 29, in yummain.user_main(sys.argv[1:], exit_code=True)

4年前 (2016-02-22) Jason Liu 故障报错, 运维 0评论 已收录 178℃

今天执行yum命令竟然莫名奇妙的报错。想想可能是前几天yum安装了一堆测试软件又卸载了导致的。报错如下:

[[email protected] ~]# yum grouplist
Loaded plugins: fastestmirror
Setting up Group Process
Loading mirror speeds from cached hostfile
epel/metalink | 12 kB 00:00
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 294, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 146, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 438, in doCommands
return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
File "/usr/share/yum-cli/yumcommands.py", line 456, in doCommand
GroupCommand.doCommand(self, base, basecmd, extcmds)
File "/usr/share/yum-cli/yumcommands.py", line 435, in doCommand
base.doGroupSetup()
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 785, in doGroupSetup
return self._getGroups()
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 810, in _getGroups
self.pkgSack
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 906, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 686, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 290, in populateSack
self.doSetup()
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 105, in doSetup
self.ayum.plugins.run('postreposetup')
File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 184, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/fastestmirror.py", line 202, in postreposetup_hook
all_urls = FastestMirror(all_urls).get_mirrorlist()
File "/usr/lib/yum-plugins/fastestmirror.py", line 369, in get_mirrorlist
self._poll_mirrors()
File "/usr/lib/yum-plugins/fastestmirror.py", line 413, in _poll_mirrors
pollThread.start()
File "/usr/lib/python2.6/threading.py", line 474, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread

 

一堆python脚本执行报错,完全看不懂。网上搜索如下方法解决:

把/etc/yum.conf文件中plugins的值由1改为0 就可以了

 

http://www.centoscn.com/CentosBug/osbug/2013/1030/1998.html

相关推荐

嗨、骚年、快来消灭0回复。