【CentOS8遇到错误】Error: Failed to download metadata for repo ‘powertools‘...
原因:
CentOS Linux 8 已于 2021 年 12 月 31 日结束生命周期 (EOL)。这意味着 CentOS 8 将不再从 CentOS 官方项目获得开发资源
解决
首先建立一个备份文件夹
mkdir /tmp/yum
然后备份文件
cd /etc/yum.repos.d
mv *.repo /tmp/yum
然后安装阿里源
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
然后清除yum缓存再重新生成yum缓存
yum clean all
yum makecache
如果报如下类似错误
Timeout was reached for
http://mirrors.aliyuncs.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml
[Connection timed out after 30000 milliseconds] Could not resolve
host: mirrors.cloud.aliyuncs.com
则执行如下命令
sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.rep
标签:aliyuncs,CentOS,mirrors,repo,yum,centos8yum,失效,com,关于
From: https://www.cnblogs.com/hxmbk/p/16843556.html