yum故障解决一例

朋友让帮忙装一下dstat,用yum install dstat安装,但是yum报错:

Loaded plugins: fastestmirror
Determining fastest mirrors
epel/metalink | 13 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 254, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 109, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 353, in doCommands
self._getTs(needTsRemove)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 99, in _getTs
self._getTsInfo(remove_only)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 110, in _getTsInfo
pkgSack = self.pkgSack
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 774, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 564, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 250, in populateSack
self.doSetup()
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 83, in doSetup
self.ayum.plugins.run('postreposetup')
File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 179, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/fastestmirror.py", line 191, in postreposetup_hook
all_urls = FastestMirror(all_urls).get_mirrorlist()
File "/usr/lib/yum-plugins/fastestmirror.py", line 349, in get_mirrorlist
self._poll_mirrors()
File "/usr/lib/yum-plugins/fastestmirror.py", line 393, in _poll_mirrors
pollThread.start()
File "/usr/lib64/python2.6/threading.py", line 474, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread

thread.error: can't start new thread,没遇到过这种错误。。。

google之,找到了如下网址:

http://unix.stackexchange.com/questions/4578/yum-update-error-cant-start-new-thread

 

里面给出的解答是yum的fastestmirror这个插件出错了,fastestmirror是为了让yum在找镜像下载之前,根据ping的值进行判断,从而选择更好的下载源。不过这里用不了了,所以就禁止掉。

在/etc/yum/pluginconf.d目录下有个文件fastestmirror.conf,是用来配置的,将其中的enabled=1改为enabled=0,再尝试安装,就搞定了,当然可能效率没有之前好,不过感觉差距不大。

posted @ 2013-08-08 11:14  guoxu3  阅读(4748)  评论(0编辑  收藏  举报