yum updateがエラーで失敗する
yum updateをしたらエラーになったので対処しているときの覚書。なぜか開発サーバーでは成功する。
環境: CentOS7, YUM 3.4.3
エラー
# yum update
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
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 370, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 179, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 573, in doCommands
return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
File "/usr/share/yum-cli/yumcommands.py", line 504, in doCommand
ret = base.updatePkgs(extcmds, update_to=(basecmd == 'update-to'))
File "/usr/share/yum-cli/cli.py", line 1025, in updatePkgs
self.update()
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 5114, in update
updates = self.up.getUpdatesTuples()
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1093, in <lambda>
up = property(fget=lambda self: self._getUpdates(),
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 838, in _getUpdates
self._up = rpmUtils.updates.Updates(self.rpmdb.simplePkgList(), self.pkgSack.simplePkgList())
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1074, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 778, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.7/site-packages/yum/repos.py", line 347, in populateSack
self.doSetup()
File "/usr/lib/python2.7/site-packages/yum/repos.py", line 158, in doSetup
self.ayum.plugins.run('postreposetup')
File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 188, 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/lib64/python2.7/threading.py", line 746, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread
「yum clean all」を試してもダメ。
検索してみると下記サイトが参考になった。
fastestmirrorを無効にする。
# less /etc/yum/pluginconf.d/fastestmirror.conf
[main]
enabled=0
これでyum updateすると成功。
< Related Posts >