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” 的解决方法
10551 0
关于 CentOS8出现“Error: Failed to download metadata for repo ‘AppStream‘: xxxx” 的解决方法
|
5月前
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:
205 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
462 1
|
6月前
|
缓存 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,这种情况一般是网络出现问题。 方法/步骤
4451 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
12507 1
【已解决】Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
|
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]
356 0
apt install git:Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
|
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
348 0
错误:为 repo ‘appstream‘ 下载元数据失败 : Cannot prepare internal mirrorlist: No URLs in mirrorlist
repos.d中更新一下源,使用vault.centos.org代替mirror.centos.org。执行以下两行代码进行修改。
996 2
错误:为 repo ‘appstream‘ 下载元数据失败 : Cannot prepare internal mirrorlist: No URLs in mirrorlist