yum erro ao atualizar ou instalar

1

Estou executando uma distro centos 6.6 e estou enfrentando um problema com o yum. Ao atualizar ou instalar qualquer pacote, recebo alguns erros, por exemplo

yum instala o 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 / messages

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

free -m

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

1 resposta

2

O segundo erro (dos comentários): erro malformado do banco de dados deve ser corrigido por yum history new

sudo yum clean all
sudo yum history new

Gostaria apenas de remover o diretório inteiro do cache ( /var/cache/yum/i386 ) para o primeiro erro, pois o yum clean não está removendo o diretório que está causando o erro. O Yum fará o download novamente do que precisa.

    
por 21.03.2015 / 15:12

Tags