阿里云源更改
2022-03-02 10:57:43
完美解决CentOS8 yum安装AppStream报错,更新yum后无法makecache的问题
更换国内yum源
我们无法使用CentOS原生yum源就是因为网络问题,你懂的。
为了快,更换国内yum源,推荐阿里云yum或者腾讯yum。网易没落了。
[root@C8-3 ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup.3 [root@C8-3 ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos8_base.repo --2020-11-02 20:51:42-- http://mirrors.cloud.tencent.com/repo/centos8_base.repo Resolving mirrors.cloud.tencent.com (mirrors.cloud.tencent.com)... 111.231.36.190 Connecting to mirrors.cloud.tencent.com (mirrors.cloud.tencent.com)|111.231.36.190|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1792 (1.8K) [application/octet-stream] Saving to: ‘/etc/yum.repos.d/CentOS-Base.repo’ /etc/yum.repos.d/Ce 100%[==================>] 1.75K --.-KB/s in 0s 2020-11-02 20:51:46 (65.6 MB/s) - ‘/etc/yum.repos.d/CentOS-Base.repo’ saved [1792/1792]
清理之前的yum缓存
[root@C8-3 ~]# yum clean all 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 Repository fasttrack is listed more than once in the configuration 18 files removed
建立新的缓存
[root@C8-3 ~]# 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 Repository fasttrack is listed more than once in the configuration CentOS-8 - AppStream 0.0 B/s | 0 B 00:04 Failed to download metadata for repo 'AppStream' Error: Failed to download metadata for repo 'AppStream'