報(bào)錯(cuò)問題
Errors during downloading metadata for repository 'powertools':
- Status code: 404 for http://mirrors.cloud.aliyuncs.com/centos/8/PowerTools/x86_64/os/repodata/repomd.xml
出現(xiàn)這個(gè)的原因背景
CentOS 8.x停止維護(hù)了乐横,順帶他的yum源也停止了姥芥,國內(nèi)的同步的yum源同步也就除了問題
解決方案
#1五续、進(jìn)入目錄
cd /etc/yum.repos.d/
#2坠宴、刪除所有源文件
rm -rf *.repo
#3蒋歌、下載最新的repo文件
wget https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo -O /etc/yum.repos.d/Centos-vault-8.5.2111.repo
wget https://mirrors.aliyun.com/repo/epel-archive-8.repo -O /etc/yum.repos.d/epel-archive-8.repo
#4歧蕉、替換repo文件中的鏈接
sed -i 's/mirrors.cloud.aliyuncs.com/url_tmp/g' /etc/yum.repos.d/Centos-vault-8.5.2111.repo && sed -i 's/mirrors.aliyun.com/mirrors.cloud.aliyuncs.com/g' /etc/yum.repos.d/Centos-vault-8.5.2111.repo && sed -i 's/url_tmp/mirrors.aliyun.com/g' /etc/yum.repos.d/Centos-vault-8.5.2111.repo
sed -i 's/mirrors.aliyun.com/mirrors.cloud.aliyuncs.com/g' /etc/yum.repos.d/epel-archive-8.repo
#5侧甫、重新創(chuàng)建緩存,若沒報(bào)錯(cuò),則正常了
yum clean all && yum makecache