Centos8 yum 报错 Error: Failed to download metadata for repo 'appstream': Cannot prepare inter
Posted ~逍遥子~
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Centos8 yum 报错 Error: Failed to download metadata for repo 'appstream': Cannot prepare inter相关的知识,希望对你有一定的参考价值。
首先建立一个备份文件夹
makedir /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.repos.d/CentOS-Base.repo
参考阿里源链接:https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.3e221b11QTXSya
说明
1、解决办法为综合网上各位大牛,亲测实现了的办法;
2、不一定能100%解决相似的问题,有错误或更好的办法欢迎留言评论;
3、若有侵犯个人或团体的权益请及时联系我;
4、本文为原创,转载或引用请注明出处
本文作者:逍遥子
本文连接:https://www.cnblogs.com/femme/p/15883208.html
版权:本人个人所有
以上是关于Centos8 yum 报错 Error: Failed to download metadata for repo 'appstream': Cannot prepare inter的主要内容,如果未能解决你的问题,请参考以下文章
centos8安装docker 遇到yum install -y yum-utils报错,No match for argument:Unable to find a match:
linux解决centos8 wget 报错nown. wget: unable to resolve host address ‘mirrors.aliyun.com’
centos8报错:Errors during downloading metadata for repository ‘base‘