首页 > 代码库 > fedora18 [linux]Error: failure: repodata/repomd.xml from fedora: [Errno 256] No more mirrors to try.

fedora18 [linux]Error: failure: repodata/repomd.xml from fedora: [Errno 256] No more mirrors to try.

在使用fedora17 系统的yum源的时候出现了如下错误:

Error: failure: repodata/repomd.xml from fedora: [Errno 256] No more mirrors to try.

 

参照网上的做法: (一般yum有变更都需要这两个操作)

[javascript] view plain copy print?
  1. yum clean all   
[javascript] view plain copy print?
  1. yum clean metadata  

 

然后在使用

[javascript] view plain copy print?
  1. yum update  


还是错误。

 

仔细看下错误:

[javascript] view plain copy print?
  1. http://download.fedoraproject.org/pub/fedora/linux/releases/17/Everything/x86_64/os/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found : http://download.fedoraproject.org/pub/fedora/linux/releases/17/Everything/x86_64/os/repodata/repomd.xml  


就是源的配置问题嘛!

搜狐源配置文件地址: http://mirrors.sohu.com/help/fedora.html

按照说明还是不行,然后去官网和搜狐看了下,17下的文件夹已经空了 (查看http://ftp.iij.ad.jp/pub/linux/fedora/updates/17/),确实没法在更新了。

 

那我们只能想一个使用其他版本或者兼容版本的方式来更新了。

 

查看本机配置的yum源:yum repolist enabled

结果是可用的为0.

 

最后发现fedora17过了社区支持版本了,找到了一个历史版本的地方 http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/17/Fedora/x86_64/os/repodata/ 

这里有很多老版本的源。

 

下面是个后来可行的办法:

我是把/etc/yum.repos.d/下面出了fedora.repo 以外的源文件都删除了,然后把fedora.repo的base_url修改

http://archives.fedoraproject.org/pub/archive/fedora/Linux/releases/$releasever/Everything/$basearch/os/

 

[javascript] view plain copy print?
  1. [fedora]  
  2. name=Fedora $releasever - $basearch  
  3. failovermethod=priority  
  4. baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/$releasever/Everything/$basearch/os/  
  5. #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch  
  6. enabled=1  
  7. metadata_expire=7d  
  8. gpgcheck=1  
  9. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch  
  10.   
  11. [fedora-debuginfo]  
  12. name=Fedora $releasever - $basearch - Debug  
  13. failovermethod=priority  
  14. baseurl=http:http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/$releasever/Everything/$basearch/debug/  
  15. #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch  
  16. enabled=0  
  17. metadata_expire=7d  
  18. gpgcheck=1  
  19. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch  
  20.   
  21. [fedora-source]  
  22. name=Fedora $releasever - Source  
  23. failovermethod=priority  
  24. baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/$releasever/Everything/source/SRPMS/  
  25. #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch  
  26. enabled=0  
  27. metadata_expire=7d  
  28. gpgcheck=1  
  29. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch  


然后执行 

[javascript] view plain copy print?
  1. yum clean metadata  
  2. yum clean all  
  3. yum update  

 

最后查看是否可用

[javascript] view plain copy print?
  1. [root@Erya yum.repos.d]# yum repolist   
  2. Loaded plugins: langpacks, presto, refresh-packagekit  
  3. repo id                                                                               repo name                                                                                        status  
  4. fedora                                                                                Fedora 17 - x86_64                                                                               27,033  
  5. repolist: 27,033  

 

这样yum又可以使用了。

fedora18 [linux]Error: failure: repodata/repomd.xml from fedora: [Errno 256] No more mirrors to try.