4
回答
关于CentOS最小化安装yum报错和Fedora20yum报错
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

一、vm virtualbox下最小化安装centos之后yum报错

(一)错误信息

[root@localhost ~]# yum makecache
Loaded plugins: fastestmirror
Determining fastest mirrors
base                                                                                                                                                                                                                 | 1.8 kB     00:00     
http://mirrors.163.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for base: Damaged repomd.xml file
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
(二)背景

ping我本地ip和ping外网都能ping通:

[root@localhost ~]# ping mirrors.163.com
PING mirrors.163.com (123.58.173.106) 56(84) bytes of data.
64 bytes from 123.58.173.106: icmp_seq=1 ttl=46 time=53.2 ms
64 bytes from 123.58.173.106: icmp_seq=2 ttl=46 time=45.7 ms
64 bytes from 123.58.173.106: icmp_seq=3 ttl=46 time=45.8 ms
64 bytes from 123.58.173.106: icmp_seq=4 ttl=46 time=45.4 ms
64 bytes from 123.58.173.106: icmp_seq=5 ttl=46 time=46.5 ms
64 bytes from 123.58.173.106: icmp_seq=6 ttl=46 time=45.6 ms
64 bytes from 123.58.173.106: icmp_seq=7 ttl=46 time=46.0 ms
64 bytes from 123.58.173.106: icmp_seq=8 ttl=46 time=46.1 ms
^C
--- mirrors.163.com ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 11740ms
rtt min/avg/max/mdev = 45.467/46.847/53.205/2.423 ms
但是ping报错的那个文件ping不通:

[root@localhost ~]# ping http://mirrors.163.com/centos/6/os/x86_64/repodata/repomd.xml
ping: unknown host http://mirrors.163.com/centos/6/os/x86_64/repodata/repomd.xml



跪求解决思路……

二、vmwareworkstation下安装Fedora20yum报错

(一)错误信息

[root@localhost zach]# yum install wget
已加载插件:langpacks, refresh-packagekit
fedora/20/x86_64/metalink                                | 9.2 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 316, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 126, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 532, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 435, in doCommand
    return base.installPkgs(extcmds, basecmd=basecmd)
  File "/usr/share/yum-cli/cli.py", line 928, in installPkgs
    txmbrs = self.install(pattern=arg)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 4661, in install
    mypkgs = self.pkgSack.returnPackages(patterns=pats,
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1050, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 770, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 344, in populateSack
    self.doSetup()
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 157, in doSetup
    self.retrieveAllMD()
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 88, in retrieveAllMD
    dl = repo._async and repo._commonLoadRepoXML(repo)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1447, in _commonLoadRepoXML
    if self._latestRepoXML(local):
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1425, in _latestRepoXML
    repomd = self.metalink_data.repomd
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 910, in <lambda>
    metalink_data = property(fget=lambda self: self._getMetalink(),
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 883, in _getMetalink
    result = ug.urlgrab(url, local, text="%s/metalink" % self.ui_id)
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1172, in urlgrab
    return self._retry(opts, retryfunc, url, filename)
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1064, in _retry
    r = apply(func, (opts,) + args, {})
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1163, in retryfunc
    _TH.update(url, dlsz, dltm, None)
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 2385, in update
    _TH.load()
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 2359, in load
    host, speed, fail, ts = line.rsplit(' ', 3)
ValueError: need more than 1 value to unpack
(二)背景

同样是网络通畅。


求大牛给出问题原因及解决思路……





举报
0x0bject
发帖于3年前 4回/2K+阅
顶部