解决方法:可参考如下方法更换yum源[[email protected] ~]# yum clean all && yum makecache
Repository AppStream is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository PowerTools is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
36 文件已删除
Repository AppStream is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository PowerTools is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
CentOS-8 - AppStream 6.9 kB/s | 2.3 kB 00:00
为 repo 'AppStream' 下载元数据失败
错误:为 repo 'AppStream' 下载元数据失败
如果使用的是阿里云的服务器,可参考教程 https://www.zfcdn.xyz/showinfo-3-36184-0.html 操作
1、将/etc/yum.repos.d目录改名备份,并重新创建新的/etc/yum.repos.d目录
mv /etc/yum.repos.d /etc/yum.repos.d.backup
2、执行如下命令下载阿里云公共的yum镜像文件(wget及crul方式选择其中一种即可)mkdir /etc/yum.repos.d
若服务器提示没安装wget命令,可执行如下命令下载yum源wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
3、执行如下命令重新创建缓存curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
若执行没有报错则表示正常,成功的提示可参考如下:yum clean all && yum makecache
随后可测试yum安装软件看是否正常。[[email protected] ~]# yum clean all && yum makecache
0 文件已删除
CentOS-8.5.2111 - Base - mirrors.aliyun.com 4.4 MB/s | 4.6 MB 00:01
CentOS-8.5.2111 - Extras - mirrors.aliyun.com 26 kB/s | 10 kB 00:00
CentOS-8.5.2111 - AppStream - mirrors.aliyun.com 4.7 MB/s | 8.4 MB 00:01
元数据缓存已建立。
文章评论 本文章有个评论