龙空技术网

CentOS 8 结束生命周期了,会出现 repo ‘AppStream‘ 下载元数据失败

叶斌兵 706

前言:

此时我们对“centos镜像下载太慢”都比较关怀,各位老铁们都想要了解一些“centos镜像下载太慢”的相关知识。那么小编同时在网络上搜集了一些有关“centos镜像下载太慢””的相关内容,希望大家能喜欢,小伙伴们快快来学习一下吧!

CentOS-8 - AppStream 为 repo ‘AppStream’ 下载元数据失败 错误:为 repo 'AppStream’下载元数据失败(由于CentOS 8 结束生命周期了)

解决:

修改 /etc/yum.repos.d/CentOS-Base.repo,CentOS-AppStream.repo,CentOS-Extras.repo

修改如下:

注释mirrorlist,把baseurl取消注释并修改为阿里云镜像地址

CentOS-Base.repo 文件

# CentOS-Base.repo## The mirror system uses the connecting IP address of the client and the# update status of each mirror to pick mirrors that are updated to and# geographically close to the client. You should use this for CentOS updates# unless you are manually picking other mirrors.## If the mirrorlist= does not work for you, as a fall back you can try the# remarked out baseurl= line instead.##[base]name=CentOS-$releasever-stream - Base - mirrors.aliyun.com#failovermethod=prioritybaseurl=   packages that may be useful[extras]name=CentOS-$releasever-stream - Extras - mirrors.aliyun.com#failovermethod=prioritybaseurl=   packages that extend functionality of existing packages[centosplus]name=CentOS-$releasever-stream - Plus - mirrors.aliyun.com#failovermethod=prioritybaseurl=  [PowerTools]name=CentOS-$releasever-stream - PowerTools - mirrors.aliyun.com#failovermethod=prioritybaseurl=  [AppStream]name=CentOS-$releasever-stream - AppStream - mirrors.aliyun.com#failovermethod=prioritybaseurl=  

CentOS-AppStream.repo 文件

# CentOS-AppStream.repo## The mirror system uses the connecting IP address of the client and the# update status of each mirror to pick mirrors that are updated to and# geographically close to the client. You should use this for CentOS updates# unless you are manually picking other mirrors.## If the mirrorlist= does not work for you, as a fall back you can try the# remarked out baseurl= line instead.###[AppStream]#name=CentOS-$releasever-stream - AppStream##mirrorlist= CentOS-AppStream.repo[AppStream]name=CentOS-$releasever-stream - AppStream#mirrorlist=

CentOS-Extras.repo 文件

# CentOS-Extras.repo## The mirror system uses the connecting IP address of the client and the# update status of each mirror to pick mirrors that are updated to and# geographically close to the client. You should use this for CentOS updates# unless you are manually picking other mirrors.## If the mirrorlist= does not work for you, as a fall back you can try the# remarked out baseurl= line instead.###additional packages that may be useful#[extras]#name=CentOS-$releasever - Extras##mirrorlist= CentOS-Extras.repo[extras]name=CentOS-$releasever - Extras#mirrorlist=

网上有人把:$releasever-stream 写错成 $releasever 了所以有人看别人的文章不行。

修改之后清缓存,制作元数据缓存

# 清除所有缓存文件

yum clean all

# 制作元数据缓存

yum makecache

标签: #centos镜像下载太慢