yum 更新时出错

yum 更新时出错

CentOS 6.3

最近我在 CentOS VPS 上运行时出现以下错误yum update

[user@foo1 ~]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/metalink                                            |  11 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 285, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 136, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 434, 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 897, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 682, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 265, in populateSack
    self.doSetup()
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 92, 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

我已经尝试过yum clean all,但这似乎没有帮助。 VPS 一开始就没有很多内存,但我并没有看到它的值很低:

[user@foo ~]# free
             total       used       free     shared    buffers     cached
Mem:        262144     109904     152240          0          0          0
-/+ buffers/cache:     109904     152240

如果我重新启动系统,它就可以正常工作(一段时间......然后问题在几个小时后再次出现)。

有什么想法吗?我可以采取什么措施来解决这个问题?

答案1

我在这里找到了答案:http://blog.aditech.info/2012/05/fix-threaderror-cant-start-new-thread.html

简而言之,盒子上的可用内存不足。禁用最快的镜像插件解决了该问题。

相关内容