CentOS7 yum安装报错“Could not resolve host: mirrorlist.centos.org; Name or service not known“之解决办法(换源)
一.一键更换脚本
一.
国内源
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)
#推荐使用一
二.
国内
bash <(curl -sSL https://linuxmirrors.cn/main.sh)
国内教育网
bash <(curl -sSL https://linuxmirrors.cn/main.sh) --edu
海外地区
bash <(curl -sSL https://linuxmirrors.cn/main.sh) --abroad
二.手动更换
CentOS7更换镜像源
1、先安装wget
yum install -y wget
2、打开阿里镜像http://mirrors.aliyun.com/
点击,帮助,查看详情:
3、下载CentOS 7的对应的repo文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
#或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
4、更新镜像源
yum clean all
yum makecache
yum -y update
执行完上面三行命令就好了
1、本网站名称 清朝云资源网
2、本站永久连接https://www.qcyqq.com/6815.html
3、本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长进行删除处理。
4、本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
5、本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
6、本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。
7.站长联系方式:766378891@qq.com
2、本站永久连接https://www.qcyqq.com/6815.html
3、本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长进行删除处理。
4、本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
5、本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
6、本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。
7.站长联系方式:766378891@qq.com
THE END
0
二维码
海报
CentOS7 yum安装报错“Could not resolve host: mirrorlist.centos.org; Name or service not known“之解决办法(换源)
一.一键更换脚本
一.
国内源
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)
#推荐使用一
二.
国内
ba……
共有 0 条评论