アップデートまたはインストール時にyumエラーが発生する

アップデートまたはインストール時にyumエラーが発生する

Centos 6.6ディストリビューションを実行しており、yumに問題があります。たとえば、パッケージの更新またはインストール中にエラーが発生します。

Yum nmapのインストール

Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/metalink                                                                                                                                   | 4.4 kB     00:00     
epel-source/metalink                                                                                                                            | 4.4 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 210, in doCommand
    return base.installPkgs(extcmds)
  File "/usr/share/yum-cli/cli.py", line 699, in installPkgs
    self.install(pattern=arg)
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 3513, in install
    mypkgs = self.pkgSack.returnPackages(patterns=pats,
  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 197, in postreposetup_hook
    if downgrade_ftp and _len_non_ftp(repo.urls) == 1:
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 701, in <lambda>
    urls = property(fget=lambda self: self._geturls(),
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 698, in _geturls
    self._baseurlSetup()
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 644, in _baseurlSetup
    mirrorurls.extend(list(self.metalink_data.urls()))
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 741, in <lambda>
    metalink_data = property(fget=lambda self: self._getMetalink(),
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 729, in _getMetalink
    shutil.move(result, self.metalink_filename)
  File "/usr/lib/python2.6/shutil.py", line 250, in move
    raise Error, "Destination path '%s' already exists" % real_dst
shutil.Error: Destination path '/var/cache/yum/i386/6/epel-source/metalink.xml/metalink.xml.tmp' already exists

tailf /var/log/メッセージ

Mar 20 15:53:58 system2 abrt: detected unhandled Python exception in '/usr/bin/yum'
Mar 20 15:53:58 system2 abrtd: New client connected
Mar 20 15:53:58 system2 abrtd: Directory 'pyhook-2015-03-20-15:53:58-8635' creation detected
Mar 20 15:53:58 system2 abrt-server[8636]: Saved Python crash dump of pid 8635 to /var/spool/abrt/pyhook-2015-03-20-15:53:58-8635

自由-m

             total       used       free     shared    buffers     cached
Mem:          1883       1834         49        140         21        242
-/+ buffers/cache:       1570        313
Swap:         4031        486       3545

答え1

2番目のエラー(コメントから):データベースの形式が正しくないため、修正する必要があります。yum history new

sudo yum clean all
sudo yum history new

/var/cache/yum/i386最初のエラーの場合、yum cleanはエラーを引き起こしたディレクトリを削除しないため、キャッシュディレクトリ全体()を削除します。 Yumは必要なものを再ダウンロードします。

関連情報