[原]Failed connect to mirrors.cloud.aliyuncs.com:80; Connection refused

web site : https://opsx.alibaba.com/mirror 

运行后出现下面的Error:

base/7/x86_64/other_db         FAILED                                          
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/4a963ccbdeb4a9246170341539b5f4816d8a55cc59b65e972ce161da4812b78a-other.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
base/7/x86_64/filelists_db     FAILED                                          
http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/dd9bfa9712cb74c7b6698776da1050bc20c71f0dc2a5d9e5a34e292cb739045c-filelists.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; Connection refused"
Trying other mirror.
base/7/x86_64/other_db         FAILED                                          
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/4a963ccbdeb4a9246170341539b5f4816d8a55cc59b65e972ce161da4812b78a-other.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.cloud.aliyuncs.com:80; Connection refused"
Trying other mirror.

解决方法:

step 1)

# cd /etc/yum.repos.d/
# vim CentOS-Base.repo
:%s/$releasever/7.4.1708/g                                ==>替换掉为真实的版本
 
step 2)
sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-Base.repo
 
step 3)
运行  yum clean all
        yum makecache
 
[root@controller yum.repos.d]# yum clean all
Loaded plugins: fastestmirror, langpacks
Cleaning repos: base extras updates
Cleaning up everything
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
Cleaning up list of fastest mirrors
[root@controller yum.repos.d]# yum makecache
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                                   | 3.6 kB  00:00:00     
extras                                                                 | 3.4 kB  00:00:00     
updates                                                                | 3.4 kB  00:00:00     
(1/12): base/x86_64/group_gz                                           | 166 kB  00:00:00     
(2/12): base/x86_64/filelists_db                                       | 6.9 MB  00:00:02     
(3/12): extras/x86_64/filelists_db                                     | 596 kB  00:00:00     
(4/12): extras/x86_64/prestodelta                                      |  84 kB  00:00:01     
(5/12): extras/x86_64/primary_db                                       | 186 kB  00:00:00     
(6/12): extras/x86_64/other_db                                         | 120 kB  00:00:00     
(7/12): updates/x86_64/prestodelta                                     | 538 kB  00:00:02     
(8/12): updates/x86_64/filelists_db                                    | 2.9 MB  00:00:04     
(9/12): base/x86_64/primary_db                                         | 5.9 MB  00:00:07     
(10/12): base/x86_64/other_db                                          | 2.5 MB  00:00:05     
(11/12): updates/x86_64/primary_db                                     | 5.2 MB  00:00:03     
(12/12): updates/x86_64/other_db                                       | 478 kB  00:00:01     
Metadata Cache Created

 

 

 

转载于:https://www.cnblogs.com/horizonli/p/9553919.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值