开发者社区> 问答> 正文

关于CentOS最小化安装yum报错和Fedora20yum报错?报错

一、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
(二)背景

同样是网络通畅。


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





展开
收起
爱吃鱼的程序员 2020-06-14 20:17:05 813 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    一、<atarget="_blank"rel="nofollow">http://mirrors.163.com/centos/6/os/x86_64/repodata/repomd.xml
    <spanstyle="font-family:song,Verdana;font-size:14px;line-height:22.383333206176758px;background-color:#F0F3FA;">改成<atarget="_blank"rel="nofollow">http://mirrors.163.com/centos/6.X/os/x86_64/repodata/repomd.xml 试试感谢回答,我稍后试一下。问题已经解决了,我在家搭建的环境可以顺利的使用源,但是公司貌似是封了下载……所以,很蛋疼……<aclass='referer'target='_blank'>@红薯<aclass='referer'target='_blank'>@叶秀兰<aclass='referer'target='_blank'>@Gavin-Top冒昧艾特,跪求指点……<imgsrc="http://www.oschina.net/js/ke/plugins/emoticons/images/81.gif"alt="">
    回复<aclass='referer'target='_blank'>@叶秀兰:谢谢~噢,我不懂这个。。。<aclass='referer'target='_blank'>@eechen可能会知道~<divclass='ref'>

    引用来自“不靠谱宅男”的评论

    一、<atarget="_blank"rel="nofollow">http://mirrors.163.com/centos/6/os/x86_64/repodata/repomd.xml
    <spanstyle="font-family:song,Verdana;font-size:14px;line-height:22.383333206176758px;background-color:#F0F3FA;">改成<atarget="_blank"rel="nofollow">http://mirrors.163.com/centos/6.X/os/x86_64/repodata/repomd.xml 试试<divclass='ref'>

    引用来自“不靠谱宅男”的评论

    一、<atarget="_blank"rel="nofollow">http://mirrors.163.com/centos/6/os/x86_64/repodata/repomd.xml
    <spanstyle="font-family:song,Verdana;font-size:14px;line-height:22.383333206176758px;background-color:#F0F3FA;">改成<atarget="_blank"rel="nofollow">http://mirrors.163.com/centos/6.X/os/x86_64/repodata/repomd.xml 试试

    2020-06-14 20:17:22
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载
Debian GNU/Linux 安全合规之路 立即下载