centos7添加阿里镜像源CentOS-Base.repo及“Failed connect to mirrors.cloud.aliyuncs.com:80问题

一、添加CentOS 7 阿里镜像源
执行:wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
二、如果提示没有wget 命令的话 使用如下命令:
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
三、然后yum makecache,如果出现问题的Failed connect to mirrors.aliyuncs.com等问题

http://mirrors.aliyuncs.com/centos/7/extras/x86_64/repodata/ae8d9246e7015e7ecb91d202d4d042a7247813ed f3da40f32d278a9c6ba754d2-other.sqlite.bz2: `[Errno 14] curl#7 - “Failed connect to mirrors.aliyuncs.com:80; Connection refused” Trying other mirror.

四、主要原因是mirros.cloud.aliyuncs.com是针对于阿里云用户的ECS 云主机可用的。建议修改一下配置文件CentOS-Base.repo
sed -i -e ‘/mirrors.cloud.aliyuncs.com/d’ -e ‘/mirrors.aliyuncs.com/d’ /etc/yum.repos.d/CentOS-Base.repo
即可解决问题


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值