美文网首页Linux
【Linux】yum安装软件报错

【Linux】yum安装软件报错

作者: 扮鬼之梦 | 来源:发表于2019-12-25 15:48 被阅读0次

错误提示

yum安装软件显示错误:cannot find a valid baseurl for repo: base/7/x86_64

解决办法

1.编辑ifcfg-eth0

vi /etc/sysconfig/network-scripts/ifcfg-eth0

2.添加以下内容

ONBOOT=yes
DNS1=8.8.8.8

3.重启网络服务

service network restart
若未恢复进行第4步

4.修改CentOS-Base.repo文件名使其无效

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

相关文章

网友评论

    本文标题:【Linux】yum安装软件报错

    本文链接:https://www.haomeiwen.com/subject/qsvcoctx.html