歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Fedora關於yum 升級錯誤

Fedora關於yum 升級錯誤

日期:2017/2/28 16:34:05   编辑:Linux教程

今天在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 的用法,www.linuxidc.com不想說。

我還在網上看見一個解決辦法,原文是這樣的:
(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 經常會出問題。不過還是希望不出問題的好。

Copyright © Linux教程網 All Rights Reserved