在进行yum安装的时候有以下提示:
[root@localhost]# yum -y install curl curl-devel
Loaded plugins: fastestmirror
base | 3.6 kB 00:00:00
epel/i386/metalink | 43 kB 00:00:00
Could not parse metalink https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=i386 error was
No repomd file
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
...
File /var/cache/yum/i386/7/epel/metalink.xml does not exist
经过查找资料,有两种情况:
一:简单的,通过以下两条命令即可处理:
yum remove epel-release --disablerepo=epel\*
yum install epel-release
二:比较麻烦一点的。因为我是两台虚拟机,一台是从另一台克隆出来的,正常情况下应该是两台要么都好要么都不好,事实却是一台OK了,另一台依旧报错。但是是新的报错:
failure: repodata/repomd.xml from zabbix: [Errno 256] No more mirrors to try.
[root@localhost]# yum install epel-release
Loaded plugins: fastestmirror
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
mysql-connectors-community | 2.5 kB 00:00:00
mysql-tools-community | 2.5 kB 00:00:00
mysql57-community | 2.5 kB 00:00:00
updates | 2.9 kB 00:00:00
http://repo.zabbix.com/zabbix/3.4/rhel/7/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/
One of the configured repositories failed (Zabbix Official Repository - i386),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
...
failure: repodata/repomd.xml from zabbix: [Errno 256] No more mirrors to try.
http://repo.zabbix.com/zabbix/3.4/rhel/7/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
测试了很多种方法,只有以下方法可行:
删除/etc/yum.repo.d/下多余出来的zabbix.repo
执行yum clean metadata
yum clean all
yum update
yum repolist查看可用的yum源,此刻应该就正常了