File /var/cache/yum/i386/7/epel/metalink.xml does not exist

在进行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源,此刻应该就正常了






  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值