天天看點

yum Error: Cannot retrieve repository metadata (repomd.xml) for repository: xxxxx

問題:

使用如下指令從頭重建yum的庫,但是仍然出現錯誤:

[root@centos-74 ~]# yum clean all
...
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@centos-74 ~]# rm -f /var/lib/rpm/__db*
[root@centos-74 ~]# rpm --rebuilddb
[root@centos-74 ~]# yum clean metadata
Loaded plugins: fastestmirror
...
0 metadata files removed
0 sqlite files removed
0 metadata files removed
[root@centos-74 ~]# yum makecache
Loaded plugins: fastestmirror
...
Determining fastest mirrors
addons                                                                                                                                | 1.9 kB     00:00     
addons/filelists_db                                                                                                                   |  568 B     00:00     
addons/other_db                                                                                                                       |  546 B     00:00     
addons/primary_db                                                                                                                     | 1.1 kB     00:00     
base                                                                                                                                  | 1.1 kB     00:00     
base/filelists                                                                                                                        | 3.6 MB     00:14     
base/other                                                                                                                            |  13 MB     00:32     
base/group                                                                                                                            | 1.1 MB     00:04     
base/primary                                                                                                                          | 1.2 MB     00:07     
extras                                                                                                                                | 2.1 kB     00:00     
extras/filelists_db                                                                                                                   | 227 kB     00:00     
extras/other_db                                                                                                                       | 399 kB     00:01     
extras/group                                                                                                                          | 9.7 kB     00:00     
extras/primary_db                                                                                                                     | 174 kB     00:00     
http://flexbox.sf.net/centos/5/x86_64/repodata/repomd.xml: [Errno 12] Timeout: <urlopen error timed out>
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: flexbox. Please verify its path and try again      

解決辦法:

1. 參考這裡​​http://forums.fedoraforum.org/showthread.php?t=223472​​的解決辦法,都試過還是不能解決問題。

a. 将https改為http;

b. 在/etc/hosts中添加

80.239.156.215          mirrors.fedoraproject.org
213.129.242.84          mirrors.rpmfusion.org      

a. 打開/etc/yum.repos.d/xxxxx.repo,對于本例來說就是/etc/yum.repost.d/flexbox.repo

b. 将項[flexbox]中的enabled=1改為enabled=0

問題解決。