问题:
使用如下命令从头重建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
2. 参考这里http://blog.csdn.net/sissiyinxi/article/details/7595617解决了上述错误。
a. 打开/etc/yum.repos.d/xxxxx.repo,对于本例来说就是/etc/yum.repost.d/flexbox.repo
b. 将项[flexbox]中的enabled=1改为enabled=0
问题解决。