Failed to download metadata for repo 'epel'

简介: Failed to download metadata for repo 'epel'

Status code: 404 for http://archives.fedoraproject.org/pub/archive/epel/8/Everything/x86_64/repodata/repomd.xml (IP: 38.145.60.24)
Error: Failed to download metadata for repo 'epel': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

sudo yum update

使用命令更新提示404:

  • image.png

原因:第三方的镜像站中均已移除CentOS 8的源,Centos 8版本已停止更新相应依赖导致的,下载新的yum源即可搞定。解决方法如下:
备份之前的repo文件,命令:

mv /etc/yum.repos.d /etc/yum.repos.d.bak

3、创建源文件目录,命令:

mkdir -p /etc/yum.repos.d

4、下载新的yum源,分别执行以下2条命令:

curl https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo > /etc/yum.repos.d/Centos-vault-8.5.2111.repo

curl https://mirrors.aliyun.com/repo/epel-archive-8.repo > /etc/yum.repos.d/epel-archive-8.repo

image.png
就可以安装成功了。

解决办法
自2022年1月31日起,CentOS团队从官方镜像中移除CentOS 8的所有包,但软件包仍在官方镜像上保留一段时间。现在被转移到https://vault.centos.org。如需继续运行旧CentOS 8,可以在/etc/yum.repos中更新repos.d,使用vault.centos.org代替mirror.centos.org

sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

目录
相关文章
关于 CentOS8出现“Error: Failed to download metadata for repo ‘AppStream‘: xxxx” 的解决方法
关于 CentOS8出现“Error: Failed to download metadata for repo ‘AppStream‘: xxxx” 的解决方法
10602 0
关于 CentOS8出现“Error: Failed to download metadata for repo ‘AppStream‘: xxxx” 的解决方法
|
6月前
Centos8 Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist:
Centos8 Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist:
217 1
centos8 Failed to download metadata for repo ‘base‘: Cannot download repomd.xml
centos8 Failed to download metadata for repo ‘base‘: Cannot download repomd.xml
472 1
|
7月前
|
安全 Linux 虚拟化
解决Centos7 yum 出现could not retrieve mirrorlist 错误
在新安装的CentOS7.x通过VMware后,遇到无法通过`ip addr`获取IP地址以及`yum`安装软件时加载镜像列表失败的问题。
1798 2
|
7月前
|
缓存 Linux 开发工具
【各种问题处理】Error: Failed to download metadata for repo ‘appstream‘
【1月更文挑战第13天】【各种问题处理】Error: Failed to download metadata for repo ‘appstream‘
|
缓存 关系型数据库 MySQL
解决CentOS执行yum命令出现File contains parsing errors:file:///etc/yum.repos.d/CentOS-Base.repo
解决CentOS执行yum命令出现File contains parsing errors:file:///etc/yum.repos.d/CentOS-Base.repo
解决CentOS执行yum命令出现File contains parsing errors:file:///etc/yum.repos.d/CentOS-Base.repo
|
人工智能 网络协议 安全
yum出现Could not retrieve mirrorlist解决方法
在centos中使用yum安装软件时可能出现Could not retrieve mirrorlist,这种情况一般是网络出现问题。 方法/步骤
4576 0
|
缓存 Linux 开发工具
【已解决】Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
【已解决】Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
12593 1
【已解决】Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
|
KVM 虚拟化
Yum配置kvm时出现---Connot retrieve repository matedata balbalabal....
Yum配置kvm时出现---Connot retrieve repository matedata balbalabal....
Yum配置kvm时出现---Connot retrieve repository matedata balbalabal....
|
Linux 开发工具 Docker
Docker报错: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
Docker报错: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
352 0