注意:这是我在堆栈交换网络上的第一个问题,请怜悯并在需要时提供指导.
我安装了一个CentOS 6.2 KVM客户端,我遇到了让yum工作的问题.这是我第一次使用CentOS,所以我觉得这是一个我错过但却找不到使用谷歌的地方.
这是我的步骤;
>下载CentOS-6.2-x86_64-minimal.iso,启动并执行默认步骤(仅询问键盘,时区,root密码和使用整个硬盘的问题)
>重新启动,登录,ping google.com无济于事
>设置以下设置;
vi /etc/resolv.conf
nameserver 8.8.8.8 nameserver 8.8.4.4
vi / etc / sysconfig / network-scripts / ifcfg-eth0
DEVICE="eth0" HWADDR="52:54:00:42:1B:4A" #NM_CONTROLLED="yes" BOOTPROTO=none ONBOOT="yes" NETMASK=255.255.255.0 IPADDR=192.168.122.151 TYPE=Ethernet
vi / etc / sysconfig / network
NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=server3.example.com GATEWAY=192.168.122.1
>我现在可以ping google.com
ping google.com
PING google.com (173.194.70.139) 56(84) bytes of data. 64 bytes from fa-in-f139.1e100.net (173.194.70.139): icmp_seq=1 ttl=50 time=5.88 ms 64 bytes from fa-in-f139.1e100.net (173.194.70.139): icmp_seq=2 ttl=50 time=5.77 ms
>但我不能’yum update’
百胜更新
Loaded plugins: fastestmirror,presto Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was 14: PYCURL ERROR 7 - "Failed to connect to 2a01:c0:2:4:216:3eff:fe0d:266d: Network is unreachable" Error: Cannot find a valid baseurl for repo: base
我的KVM访客也是NAT,因为它令人担忧.
您的系统正在DNS中查找mirrorlist.centos.org的IPv6地址,然后无法连接到该地址.除非您实际拥有IPv6连接,否则应该是
disable IPv6.
原文链接:https://www.f2er.com/bash/385662.html