新安装的系统centos7.6,无法使用yum报错cannot find a valid baseurl for repo:base/7/x86_64
创始人
2024-09-25 12:21:18
0次

1.检查网络:尝试ping www.baidu.com是否通

2.检查dns配置:cd /etc/sysconfig/network-scripts 进入网卡配置中,检查onboot是否是yes,增加DNS1=8.8.8.8
DNS2=4.2.2.2

3.更换yum源:下载国内yum源配置文件到/etc/yum.repos.d/CentOS-Base.repo
阿里云 CentOS 7 源(推荐):

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
1
网易163 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
1
搜狐 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.sohu.com/help/CentOS7-Base-sohu.repo
1
华为云 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.myhuaweicloud.com/repo/CentOS-7.repo
1
华东理工大学 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.ustc.edu.cn/centos/7/os/x86_64
1
清华大学 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.tuna.tsinghua.edu.cn/centos/7/os/x86_64/
1
北京理工大学 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.bfsu.edu.cn/centos/7/os/x86_64/
1
上海交通大学 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo https://ftp.sjtu.edu.cn/centos/7/os/x86_64/
1
中国科学技术大学 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.ustc.edu.cn/centos/7/os/x86_64/
1
兰州大学 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirror.lzu.edu.cn/centos/7/os/x86_64/
1
以上命令选择一个就行了                  
原文链接:https://blog.csdn.net/weixin_54626591/article/details/138488919

4.清理yum缓存,并生成新的缓存
yum clean all 
  • 1
yum makecache

相关内容

热门资讯

微扑克总结!德扑之星能开挂透视... 微扑克总结!德扑之星能开挂透视吗(辅助),总是真的有辅助工具是一款可以让一直输的玩家,快速成为一个“...
WePoKer必备!德扑之星是... 您好,德扑之星是不是有人用挂这款游戏可以开挂的,确实是有挂的,需要了解加微【136704302】很多...
aapoker必备!wepok... 一款 AI 游戏攻略黑科技工具上线,查攻略效率直接开挂。它整合版本更新、装备搭配、BOSS 打法、牌...
菠萝智星德州普及!WePoKe... 菠萝智星德州普及!WePoKer辅助挂怎么下载(透视挂),好像有透视挂脚本是一款可以让一直输的玩家,...
WePoKer揭露!wepok... 您好,wepoker辅助工具好用吗这款游戏可以开挂的,确实是有挂的,需要了解加微【485275054...
德扑之星总结!wepoker有... 很多人使用云端 AI 时,都担心wepoker有挂吗作弊、内部资料上传带来隐私风险。这款本地运行的 ...
红龙PoKer解谜!安卓wep... 您好:安卓wepoker德州透视挂下载这款游戏可以开挂的,确实是有挂的,很多玩家在这款游戏中打牌都会...
wpk分享!wepokerpu... wpk分享!wepokerpus透视挂是真的假的(辅助器),素来真的有辅助器神器是一款可以让一直输的...
aapoker总结!wepok... AI 黑科技赛道又上新,这款智能处理工具堪称效率开挂,专门面向短视频创作者打造。它打通脚本撰写、AI...
微扑克曝光!runit德州透视... 微扑克曝光!runit德州透视软件辅助挂(开挂),一向有开挂插件是一款可以让一直输的玩家,快速成为一...