[原]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
作者:horizonli
出处:http://www.cnblogs.com/horizonli/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
如果您认为文章还不错或者有所收获,您可以通过扫描下方的二维码进行随性打赏(¥1/¥2/¥5)以及点击左下角的【好文要顶】按钮以示支持,或者扫描关注即将写作的公众号二维码,因为这几种方式都是支持我继续写作,分享的最大动力!公众号将记录工作生活,技术内容,个性观点等内容,欢迎您的关注
出处:http://www.cnblogs.com/horizonli/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
支付宝(alipay) 二维码打赏 |
微信(wechat) 二维码打赏 JUST LI(**波) |
微信公众号: 木子李的菜田 |