CentOS 8安装宝塔Errors during downloading…’epel’ Status code: 404

2022年4月27日14:12:07 发表评论 0 views
2022云服务器活动

阿里云:2核4G6M服务器68元/年、2核4G服务器198元/年、4核8G服务器346元一年、8核16G5M 更多...
腾讯云:腾讯云2核4G服务器8M带宽70元/年,更多1c2g/2c4g/2c8g/4c8g/8c16g/16c32g...
华为云:华为云1核2G服务器39元/年,有香港节点更多1c2g/2c4g/2c8g/4c8g/8c16g/16c32g...

CentOS 8系统安装宝塔面板提示Error: Failed to download metadata for repo 'epel': Cannot download repomd.xml: Cannot download ...Status code: 404 for这是由于Centos 8版本已停止更新相应依赖,下载新的yum源即可解决,新手站长来详细说下CentOS 8安装宝塔面板报错及解决方法:

CentOS 8安装宝塔面板错误Error...epel...404

Linux服务器CentOS 8版本操作系统执行宝塔安装命令报错如下图:

CentOS 8安装宝塔Errors during downloading...'epel' Status code: 404

Error: Failed to download metadata for repo 'epel'

Errors during downloading metadata for repository '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

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

1、SSH连接到你的CentOS 8云服务器
2、备份之前的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

执行上述4条命令,如下图:

CentOS 8安装宝塔Errors during downloading...'epel' Status code: 404

CentOS 8更新yum源

更新完yum源后,再次执行宝塔安装命令即可正常安装。

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: