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
두 번째 오류(댓글에서): 데이터베이스 형식이 잘못되었으므로 수정해야 합니다.yum history new
sudo yum clean all
sudo yum history new
/var/cache/yum/i386
첫 번째 오류의 경우 yum clean이 오류를 일으킨 디렉터리를 삭제하지 않기 때문에 전체 캐시 디렉터리( )를 삭제하겠습니다 . Yum은 필요한 것을 다시 다운로드합니다.