Fedora关于yum 升级错误

今天在Fedora下用yum 安装软件出现“Error: Cannot retrieve repository metadata (repomd.xml) for repository: adobe-linux-i386. Please verify its path and try again”

在百度里搜索了一下,发现不只我一个人出现这个问题,但是都有一点点区别。不过主要问题还是yum找不到对应的repository服务器。发现yum官网上有关于这个错误的解释,和解决方法。


Error: Cannot retrieve repository metadata (repomd.xml) for repository: rpmfusion-foo. Please verify its path and try again
Yum cannot connect to the RPM Fusion servers if you get above message. That could be a problem with your local network or a problem with the MirrorManager servers from RPM Fusion. If it's the latter use this comment to temporary work around the problem:

su -c "sed -i 's|^#baseurl|baseurl| ; s|^mirrorlist|#mirrorlist|' /etc/yum.repos.d/rpmfusion*free*repo"
To undo the change later use this command:

su -c "sed -i 's|^baseurl|#baseurl| ; s|^#mirrorlist|mirrorlist|' /etc/yum.repos.d/rpmfusion*free*repo"
主要是说,连不上rpmfusion的服务器,不是你的网络有问题就是镜像管理服务器(MirrorManager severs)出问题了。如果是后者的话,就可以用 sed 命令修改一下服务器地址,让yum 暂时何以用。关于sed 的用法,不想说。

我还在网上看见一个解决办法,原文是这样的:
(1) You need to edit two of your repository files:
  /etc/yum.repos.d/fedora.repo  and /etc/yum.repos.d/fedora-updates.repo .
Now un-comment all the lines that start with  the term baseurl  and place a comment before all lines that start with mirrorlist . This should be done for both the above files.
(2) Now edit your /etc/hosts file and append the following to it's contents:
     80.239.156.215          mirrors.fedoraproject.org
     213.129.242.84          mirrors.rpmfusion.org
(1)主要是修改/etc/yum.repos.d/fedora.repo 和 /etc/yum.repos.d/fedora-updates.repo 这两个文件,把两个文件中所有baseur前面的注释符去掉,在所有mirrorlist前加上注释。
(2)然后修/etc/hosts文件,在最后面加上两行
     80.239.156.215          mirrors.fedoraproject.org
     213.129.242.84          mirrors.rpmfusion.org

我只按后面的这一方法来做,yum可以成功更新了。在网上还看到,也许会经常出现这个问题,因为fedoraproject.org 经常会出问题。不过还是希望不出问题的好。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/26705.html