欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

yum update 升级报错的解决办法

程序员文章站 2022-06-07 18:48:24
yum 在启动 fastestmirror 插件时出错,是 yum 的一个 bug(http://yum.baseurl.org/ticket/70)。... 10-12-20...
今天deepvps在一个 centos vps 上升级系统时遇到一个问题,yum 报错:

复制代码
代码如下:

# yum update
loaded plugins: fastestmirror
loading mirror speeds from cached hostfile
traceback (most recent call last):
file “/usr/bin/yum”, line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=true)
file “/usr/share/yum-cli/yummain.py”, line 229, in user_main
errcode = main(args)
file “/usr/share/yum-cli/yummain.py”, line 104, in main
result, resultmsgs = base.docommands()
file “/usr/share/yum-cli/cli.py”, line 339, in docommands
self._getts(needtsremove)
file “/usr/lib/python2.4/site-packages/yum/depsolve.py”, line 101, in _getts
self._gettsinfo(remove_only)
file “/usr/lib/python2.4/site-packages/yum/depsolve.py”, line 112, in _gettsinfo
pkgsack = self.pkgsack
file “/usr/lib/python2.4/site-packages/yum/__init__.py”, line 591, in
pkgsack = property(fget=lambda self: self._getsacks(),
file “/usr/lib/python2.4/site-packages/yum/__init__.py”, line 434, in _getsacks
self.repos.populatesack(which=repos)
file “/usr/lib/python2.4/site-packages/yum/repos.py”, line 223, in populatesack
self.dosetup()
file “/usr/lib/python2.4/site-packages/yum/repos.py”, line 71, in dosetup
self.ayum.plugins.run(‘postreposetup’)
file “/usr/lib/python2.4/site-packages/yum/plugins.py”, line 176, in run
func(conduitcls(self, self.base, conf, **kwargs))
file “/usr/lib/yum-plugins/fastestmirror.py”, line 181, in postreposetup_hook
all_urls = fastestmirror(all_urls).get_mirrorlist()
file “/usr/lib/yum-plugins/fastestmirror.py”, line 333, in get_mirrorlist
self._poll_mirrors()
file “/usr/lib/yum-plugins/fastestmirror.py”, line 376, in _poll_mirrors
pollthread.start()
file “/usr/lib/python2.4/threading.py”, line 416, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can’t start new thread

yum 在启动 fastestmirror 插件时出错,是 yum 的一个 bug(http://yum.baseurl.org/ticket/70)。如果停掉 mysqld,yum 一切工作正常。临时解决办法是 yum update 时禁止启动 fastestmirror 插件。

复制代码
代码如下:

yum –disableplugin=fastestmirror update