How to fix Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorli

Step 1:

[root@MaxwellDBA home]# cd /etc/yum.repos.d/

Step2 :

[root@MaxwellDBA yum.repos.d]# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
[root@MaxwellDBA yum.repos.d]# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

Step3:

[root@MaxwellDBA yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo

Step4:

[root@MaxwellDBA yum.repos.d]# yum clean all
Repository extras is listed more than once in the configuration
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/CentOS-epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
44 files removed
[root@MaxwellDBA yum.repos.d]#

Step5:
[root@MaxwellDBA yum.repos.d]# yum makecache
Repository extras is listed more than once in the configuration
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/CentOS-epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
CentOS-8.5.2111 - Base - mirrors.aliyun.com                                                                                                                                    179 kB/s | 4.6 MB     00:26    
CentOS-8.5.2111 - Extras - mirrors.aliyun.com                                                                                                                                   35 kB/s |  10 kB     00:00    
CentOS-8.5.2111 - AppStream - mirrors.aliyun.com                                                                                                                               119 kB/s | 8.4 MB     01:12    
CentOS Linux 8 - AppStream                                                                                                                                                     3.7 MB/s | 8.4 MB     00:02    
CentOS Linux 8 - BaseOS                                                                                                                                                        4.0 MB/s | 4.6 MB     00:01    
Extra Packages for Enterprise Linux 8 - x86_64                                                                                                                                  42 MB/s |  11 MB     00:00    
MySQL 8.0 Community Server                                                                                                                                                     4.5 MB/s | 2.3 MB     00:00    
MySQL Connectors Community                                                                                                                                                     236 kB/s |  74 kB     00:00    
MySQL Tools Community                                                                                                                                                          1.2 MB/s | 459 kB     00:00    
Metadata cache created.
[root@MaxwellDBA yum.repos.d]#

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值