首页 资源列表 文章列表

Centos8安装yum源时候出现的异常问题及解决方案Errors during downloading metadata for repository 'baseos':

由于centos放弃维护

导致yum 安装依赖报错

Errors during downloading metadata for repository 'base':

 - Curl error (28): Timeout was reached for http://mirrors.aliyuncs.com/centos/8-stream-stream-stream-stream/BaseOS/aarch64/os/repodata/repomd.xml [Connection timed out after 30001 milliseconds]

 - Status code: 404 for http://mirrors.aliyun.com/centos/8-stream-stream-stream-stream/BaseOS/aarch64/os/repodata/repomd.xml (IP: 183.201.84.178)

错误:为 repo 'base' 下载元数据失败 : Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

解决方案是切换到阿里镜像

第一步:进入这个文件,在终端输入:


cd /etc/yum.repos.d/


第二步:删除.repo,输入下面命令,输入 y


rm *.repo


第三步:查看当前目录下的.repo是否删除成功,输入下面字符串,若没有显示.repo就删除成功了


第四步:下载可以正常使用的.repo文件

安装curs命令的使用:

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo


安装wgets命令的使用

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo


第五步:运行yum makecache

yum makecache


然后yum安装依赖就成功了