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

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...