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-*

目录
相关文章
|
4天前
|
安全 Linux 虚拟化
解决Centos7 yum 出现could not retrieve mirrorlist 错误
在新安装的CentOS7.x通过VMware后,遇到无法通过`ip addr`获取IP地址以及`yum`安装软件时加载镜像列表失败的问题。
11 2
关于 CentOS8出现“Error: Failed to download metadata for repo ‘AppStream‘: xxxx” 的解决方法
关于 CentOS8出现“Error: Failed to download metadata for repo ‘AppStream‘: xxxx” 的解决方法
关于 CentOS8出现“Error: Failed to download metadata for repo ‘AppStream‘: xxxx” 的解决方法
|
6月前
centos8 Failed to download metadata for repo ‘base‘: Cannot download repomd.xml
centos8 Failed to download metadata for repo ‘base‘: Cannot download repomd.xml
208 1
|
6天前
|
缓存 Linux 开发工具
【各种问题处理】Error: Failed to download metadata for repo ‘appstream‘
【1月更文挑战第13天】【各种问题处理】Error: Failed to download metadata for repo ‘appstream‘
|
6月前
|
人工智能 网络协议 安全
yum出现Could not retrieve mirrorlist解决方法
在centos中使用yum安装软件时可能出现Could not retrieve mirrorlist,这种情况一般是网络出现问题。 方法/步骤
289 0
|
缓存 关系型数据库 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
|
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
260 0
|
Ubuntu 开发工具 git
apt install git:Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/git/git-man_2.17.1-1ubuntu0.11_all.deb 404 Not Found [IP: 91.189.91.39 80]
283 0
apt install git:Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
|
缓存 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
11348 1
【已解决】Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
|
Linux Go
centos8 appstream大坑Failed to download metadata for repo appstream: Cannot prepare internal mirrorlis
centos8 appstream大坑Failed to download metadata for repo appstream: Cannot prepare internal mirrorlis
257 0