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

时间:2022-01-21 18:42:04

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

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

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

运行后出现下面的Error:

base//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//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//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 ::
extras | 3.4 kB ::
updates | 3.4 kB ::
(/): base/x86_64/group_gz | kB ::
(/): base/x86_64/filelists_db | 6.9 MB ::
(/): extras/x86_64/filelists_db | kB ::
(/): extras/x86_64/prestodelta | kB ::
(/): extras/x86_64/primary_db | kB ::
(/): extras/x86_64/other_db | kB ::
(/): updates/x86_64/prestodelta | kB ::
(/): updates/x86_64/filelists_db | 2.9 MB ::
(/): base/x86_64/primary_db | 5.9 MB ::
(/): base/x86_64/other_db | 2.5 MB ::
(/): updates/x86_64/primary_db | 5.2 MB ::
(/): updates/x86_64/other_db | kB ::
Metadata Cache Created