Cannot find a valid baseurl for repo: base

前端之家收集整理的这篇文章主要介绍了Cannot find a valid baseurl for repo: base前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。


执行yum命令出现该错误

Cannot find a valid baseurl for repo: base

ping www.baidu.com 不通,但是内网是通的;

检查步骤:

  1. 确认本地ip、DNS没问题;

  2. 检查网关;
    查看route:


    发现:没有默认网关。
    解决:执行route add default gw 192.168.1.1 dev eth0

==


yum-yinstallwget

已加载插件:fastestmirror
设置安装进程
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
错误:Cannot find a valid baseurl for repo: base


==

vi /etc/resov.conf

find / -name resov.conf
vi /etc/resov.conf
ls /etc/yum.repos.d
vi CentOS-Base.repo

find / -name ifcfg-eth0

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

cat /proc/version

reboot

vi /etc/resolv.conf

里面加了一句:

# Generated by NetworkManager
nameserver 192.168.1.1
nameserver 114.114.114.114


ping www.baidu.com

ping mirrorlist.centos.org

猜你在找的Bash相关文章