异常信息
[root@localhost ~]# yum -y update
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Update Process
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: ftp.sjtu.edu.cn
* updates: centos.ustc.edu.cn
http://centos.ustc.edu.cn/centos/6.8/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'centos.ustc.edu.cn'"
Trying other mirror.
http://ftp.sjtu.edu.cn/centos/6.8/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'ftp.sjtu.edu.cn'"
Trying other mirror.
http://mirror.bit.edu.cn/centos/6.8/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.bit.edu.cn'"
Trying other mirror.
http://mirrors.163.com/centos/6.8/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.163.com'"
Trying other mirror.
http://mirrors.aliyun.com/centos/6.8/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyun.com'"
Trying other mirror.
http://mirrors.cn99.com/centos/6.8/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.cn99.com'"
Trying other mirror. ..... sssd-krb5-common-1.13.3-22.el6_8.6.x86_64: failure: Packages/sssd-krb5-common-1.13.3-22.el6_8.6.x86_64.rpm from updates: [Errno 256] No more mirrors to try.
nss-tools-3.21.3-2.el6_8.x86_64: failure: Packages/nss-tools-3.21.3-2.el6_8.x86_64.rpm from updates: [Errno 256] No more mirrors to try.
iscsi-initiator-utils-6.2.0.873-22.el6_8.x86_64: failure: Packages/iscsi-initiator-utils-6.2.0.873-22.el6_8.x86_64.rpm from updates: [Errno 256] No more mirrors to try.
db4-4.7.25-20.el6_8.1.x86_64: failure: Packages/db4-4.7.25-20.el6_8.1.x86_64.rpm from updates: [Errno 256] No more mirrors to try.
1.服务器解析不了域名, ping mirrors.ustc.edu.cn 这个地址,发现 unknown host mirrors.ustc.edu.cn,ping www.baidu.com同样不行
[root@localhost ~]# ping mirrors.ustc.edu.cn
ping: unknown host mirrors.ustc.edu.cn
2.查看 /etc/resolv.conf 文件,发现没有设置域名服务
[root@localhost ~]# cat /etc/resolv.conf
# Generated by NetworkManager # No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
search localhost
3.查看网络配置文件,发现没有配置默认网关
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
IPADDR=192.168.200.105
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=eth0
3.查看当前网关信息,发现默认网关不对
[root@localhost ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
link-local * 255.255.0.0 U 1002 0 0 eth0
192.0.0.0 * 255.0.0.0 U 0 0 0 eth0
4.添加默认网关(虚拟机选择桥接模式配置下面信息)
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 #网卡名称
#HWADDR=00:0C:29:3B:A3:99 MAC地址可以不写(与 /etc/udev/rules.d/70-persistent-net.rules 文件中的 ATTR{address}值一致就行)
TYPE=Ethernet #网络类型(通常是Ethemet)
UUID=3259a85a-c34c-4ecf-98e8-e1fe495c899f #随机数,唯一标识
ONBOOT=yes #设置为yes,开机自动启用网络连接
NM_CONTROLLED=yes #network mamager的参数 ,是否可以由NNetwork Manager托管
BOOTPROTO=static #设置为none禁止DHCP,设置为static启用静态IP地址,设置为dhcp开启DHCP服务
DNS1=192.168.200.1 #DNS 配置
IPV6INIT=no #是否启用IPv6的接口
USERCTL=no #是否允许非root用户控制该设备,设置为no,只能用root用户更改
IPADDR=192.168.200.200 #指定静态ip地址
NETMASK=255.255.255.0 #子网掩码
GATEWAY=192.168.200.1 #默认网关
windows查看网关
控制面板 -->网络和Internet -->网络和共享中心 -->本地连接 -->详细信息
如图
5.重启网络
service network restart
centos6.5 yum update 报错Couldn't resolve host 'centos.ustc.edu.cn'的更多相关文章
-
yum命令报错 yum update File ";/usr/bin/yum";, line 30 except KeyboardInterrupt, e: --CentOS7.5
1.问题: 使用yum命令如:yum update 报SyntaxError invalid syntax 2.原因分析 yum的解释器是Python,CentOS自带的yum采用(自带的)pytho ...
-
centos6.5环境wget报错Unable to establish SSL connection
centos6.5环境wget报错Unable to establish SSL connection [root@centossz008 src]# wget --no-check-certific ...
-
linux -小记(2)问题:yum 安装报错";Another app is currently holding the yum lock; waiting for it to exit... ...: yum Memory : 26 M RSS (868 MB VSZ) Started: Wed Oct 26 22:48:24 2016 - 0";
yum 安装报错 "Another app is currently holding the yum lock; waiting for it to exit... The other ap ...
-
mysql执行update报错1175解决方法
mysql执行update报错 update library set status=true where 1=1 Error Code: 1175. You are using safe update ...
-
yum安装报错有冲突file /usr/lib64/php/modules/fileinfo.so conflicts between
yum安装报错有冲突file /usr/lib64/php/modules/fileinfo.so conflicts between attempted installs of php-pecl-f ...
-
centos在yum install报错:Another app is currently holding the yum lock解决方法
centos在yum install报错:Another app is currently holding the yum lock,这个问题可能是很多的新手经常遇到问题,之前也有人问我,包括本人在刚 ...
-
mysql执行update报错 Err] 1055 - 'information_schema.PROFILING.SEQ' isn't in GROUP BY
mysql执行update报错 Err] 1055 - 'information_schema.PROFILING.SEQ' isn't in GROUP BY 今天开发的同事发来如下错误信息,最最简 ...
-
kali linux 2.0配置更新源后apt-get update 报错
这个是我/etc/apt/sources.list的更新源: deb http://http.kali.org/kali kali-rolling main contrib non-free deb ...
-
CentOS6.5 重启网络报错:Bringing up interface eth0: Error: Connection activation failed: Device not managed by NetworkManager or unavailable
CentOS6.5 重启网络报错: Bringing up interface eth0: Error: Connection activation failed: Device not manage ...
随机推荐
-
UVA213 信息解码
对于lrj的想法,真是太清晰.自己真的是很难去做到.贴此代码,加以练习,加以感悟. #include<cstdio> #include<cstring> ][<<] ...
-
最简实例说明wait、notify、notifyAll的使用方法
wait().notify().notifyAll()是三个定义在Object类里的方法,可以用来控制线程的状态. 这三个方法最终调用的都是jvm级的native方法.随着jvm运行平台的不同可能有些 ...
-
Python关键字yield的解释(*)
3.1. 提问者的问题 Python关键字yield的作用是什么?用来干什么的? 比如,我正在试图理解下面的代码: def node._get_child_candidates(self, dista ...
-
aix下oracle数据库创建表空间和用户
#mklv -y lvname -T O -w n -s n -r n datavg 500 在两个节点分别修改如下权限: #chown -R oracle:oinstall /dev/rlvname ...
-
基于Delphi的Socket I/O模型全接触 good
老陈有一个在外地工作的女儿,不能经常回来,老陈和她通过信件联系.他们的信会被邮递员投递到他们的信箱里. 这和Socket模型非常类似.下面我就以老陈接收信件为例讲解Socket I/O模型. 一:se ...
-
igmpproxy源码学习——igmpProxyInit()
igmpproxy源码学习--igmpProxyInit()函数具体解释.igmpproxy初始化 在执行igmpproxy的主程序igmpproxyRun()之前须要对igmpproxy进行一些配置 ...
-
js与objective-c的交互-备
在写 JavaScript 的时候,可以使用一个叫做 window 的对象,像是我们想要从现在的网页跳到另外一个网页的时候,就会去修改 window.location.href 的位置:在我们的 Ob ...
-
OpenCms JSP 模板开发——创建一个简单的JSP模板
OpenCms中的JSP模板就是一个普通的JSP页面,在特定的位置使用标签来包含内容,在这个的例子中,我们将要开发一个简单JSP模板,这个模板只是在内容(如<html>.<body& ...
-
推举算法 AdaBoost 哥德尔奖 Godel Prize
推举算法 AdaBoost 2003年理论计算机科学界最高奖 哥德尔奖 Godel Prize
-
根据wsdl,基于wsimport生成代码的客户端
根据wsdl,基于wsimport生成代码的客户端 wsimport是jdk自带的命令,可以根据wsdl文档生成客户端中间代码,基于生成的代码编写客户端,可以省很多麻烦. 局限性:wsimport ...