打赏
Fork me on GitHub

[原]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

 

 

 

posted @ 2018-08-29 14:04  my_cool2007  阅读(14889)  评论(3编辑  收藏  举报