赞
踩
一、添加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
即可解决问题
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。