1.yum 安装出错

[root@iz25m0z7ik3z ~]#yum install mysql

  1. [root@iZ25m0z7ik3Z ~]#yum install mysql
  2. Loaded plugins: security
  3. http://mirrors.aliyun.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyun.com'"
  4. Trying other mirror.
  5. http://mirrors.aliyuncs.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyuncs.com'"
  6. Trying other mirror.
  7. http://mirrors.aliyun.com/epel/6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyun.com'"
  8. Trying other mirror.
  9. http://mirrors.aliyuncs.com/epel/6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyuncs.com'"
  10. Trying other mirror.
  11. http://mirrors.aliyun.com/centos/6/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyun.com'"
  12. Trying other mirror.
  13. http://mirrors.aliyuncs.com/centos/6/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyuncs.com'"
  14. Trying other mirror.
  15. http://mirrors.aliyun.com/centos/6/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyun.com'"
  16. Trying other mirror.
  17. http://mirrors.aliyuncs.com/centos/6/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyuncs.com'"
  18. Trying other mirror.
  19. Setting up Install Process
  20. Package mysql-5.1.73-5.el6_6.x86_64 already installed and latest version
  21. Nothing to do

2. 修改dns

[root@iz25m0z7ik3z ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

文末添加

DNS1=8.8.8.8
DNS2=8.8.4.4

3. 重启network 服务

[root@iz25m0z7ik3z ~]# service network restart

  1. Shutting down interface eth0:  Device state: 3 (disconnected)
  2. [  OK  ]
  3. Shutting down interface eth1:                              [  OK  ]
  4. Shutting down loopback interface:                          [  OK  ]
  5. FATAL: Module off not found.
  6. Bringing up loopback interface:                            [  OK  ]
  7. Bringing up interface eth0:  Active connection state: activated
  8. Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/2
  9. [  OK  ]
  10. Bringing up interface eth1:  RTNETLINK answers: File exists
  11. RTNETLINK answers: File exists
  12. [  OK  ]
  13. FATAL: Module off not found.

4. 如下提示表示network  服务 与 NetworkManager服务冲突

  1. Bringing up interface eth0:  Active connection state: activated
  2. Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/2
  3. [  OK  ]

应该是之前安装了图形界面“X Window System”导致。

5. 停止NetworkManager

[root@iz25m0z7ik3z ~]#  service NetworkManager stop

  1. Stopping NetworkManager daemon:                            [  OK  ]

6. 再次重启 network 服务

[root@iz25m0z7ik3z ~]#  service network restart

  1. Shutting down interface eth0:                              [  OK  ]
  2. Shutting down interface eth1:                              [  OK  ]
  3. Shutting down loopback interface:                          [  OK  ]
  4. FATAL: Module off not found.
  5. Bringing up loopback interface:                            [  OK  ]
  6. Bringing up interface eth0:  Determining if ip address 10.44.153.37 is already in use for device eth0...
  7. [  OK  ]
  8. Bringing up interface eth1:  Determining if ip address 101.200.188.182 is already in use for device eth1...
  9. RTNETLINK answers: File exists
  10. [  OK  ]
  11. FATAL: Module off not found.

7. 该警告一般是由于网卡解析arp协议导致的,可在网卡的配置文件中加入ARPCHECK=NO参数来屏蔽该检查

[root@iz25m0z7ik3z ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

文末添加

ARPCHECK=no

再次启动网卡

  1. Shutting down interface eth0:                              [  OK  ]
  2. Shutting down interface eth1:                              [  OK  ]
  3. Shutting down loopback interface:                          [  OK  ]
  4. FATAL: Module off not found.
  5. Bringing up loopback interface:                            [  OK  ]
  6. Bringing up interface eth0:                                [  OK  ]
  7. Bringing up interface eth1:  RTNETLINK answers: File exists
  8. [  OK  ]
  9. FATAL: Module off not found.

至此yum update 一切正常。

来源:http://blog.csdn.net/zhugq_1988/article/details/47784031

yum 安装出错--"Couldn't resolve host 'mirrors.aliyun.com'"的更多相关文章

  1. CentOs 6 或 7 yum安装JDK1.8 (内含报 PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.163.com'"错误解决方案)并分析为什么不能yum安装

    查看JDK的安装路径 # java -version============================查看Linux系统版本信息# cat /etc/redhat-releaseCentOS r ...

  2. yum安装出错

    [root@lxh yum.repos.d]# yum install -y samba Loaded plugins: fastestmirror, refresh-packagekit, secu ...

  3. 云服务器镜像问题("Couldn't resolve host 'mirrors.tencentyun.com')

    云服务器镜像问题("Couldn't resolve host 'mirrors.tencentyun.com') 原因: 腾讯云服务器内网yum源的域名 mirrors.tencentyu ...

  4. yum-config-manager YUM安装遭遇: [Errno 256] No more mirrors to try CentOS yum之$releasever和$basearch

    YUM安装遭遇: [Errno 256] No more mirrors to try createrepo 有问题. CentOS yum之$releasever和$basearch分类: 操作系统 ...

  5. YUM安装软件提示[Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; 未知的错误"

    报错如下: 翻译过来就是 所以问题很简单: 第一种情况:本地DNS服务错误 第二种情况:远程主机挂了 第三种情况:远程主机地址配置错误 第一种解决方法:换DNS 首先验证一下是不是本地DNS错误 从上 ...

  6. 内核升级在线安装报错:Could not retrieve mirrorlist http://mirrors.elrepo.org/mirrors-elrepo-kernel.el7 error was14: curl#6 - "Could not resolve host: mirrors.elrepo.org; 未知的错误"

    修改网卡配置 [root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens32 BOOTPROTO="none" ...

  7. 安装时遇到:正在尝试其它镜像。 http://mirrors.btte.net/centos/7.2.1511/extras/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.btte.net; 未知的错误"

    我出现这种错误是因为网络链接问题,因为我设置虚拟机网络链接为VmNET8,设置了nat模式,使得我本地机可以访问虚拟机的linux服务器.但是打开虚拟机的浏览器却不能上网了.所以现在我用xshell装 ...

  8. yum 安装 出错 Error: Protected multilib versions:

    例如:安装zlib出错 yum install zlib-1.2.3-29.el6.i686 Error: Protected multilib versions: zlib-1.2.3-29.el6 ...

  9. curl: (6) Could not resolve host: mirrors.163.com; Unknown error 服务器上解析不了域名,换成ip可以

    原因是DNS域名解析问题: 添加nameserver即可解决 echo nameserver 8.8.8.8 > /etc/resolv.conf 解释一下DNS服务 DNS(Domain Na ...

随机推荐

  1. java实现折半排序算法

    折半插入排序法,又称二分插入排序法,是直接插入排序法的改良版,也需要执行i-1趟插入,不同之处在于,第i趟插入,先找出第i+1个元素应该插入的的位置,假定前i个数据是已经处于有序状态. 折半插入排序( ...

  2. redis学习笔记——RDB和AOF持久化一

    为防止数据丢失,需要将 Redis 中的数据从内存中 dump 到磁盘,这就是持久化.Redis 提供两种持久化方式:RDB 和 AOF.Redis 允许两者结合,也允许两者同时关闭. RDB 可以定 ...

  3. JMeter 十三:生成 report dashboard

    参考:http://jmeter.apache.org/usermanual/generating-dashboard.html JMeter 3.x开始,可以生成HTML格式的report . 注意 ...

  4. Activity生命周期以及启动模式对生命周期的影响(二)

    前面一篇文章概述了Android四大组件之一的Activity生命周期方法的调用先后顺序,但对于非标准启动模式下Activity被多次调用时的一些生命周期方法并未详细阐述,现在针对该情况着重记录. 现 ...

  5. A-Z排序控件的实现

    前言 最近项目需要做一个地区首字母a-z排序的效果,记录一下自己如何实现的. 先看下效果图: 分析 这种效果自己实现还是第一次;之前见过这种效果: 这些字母都是onDraw画上去的;只要知道每个字母的 ...

  6. Unity3D实现3D立体游戏原理及过程,需偏振眼镜3D显

    http://tieba.baidu.com/p/3038509618?fr=ala0&pstaala=3

  7. lodash 移除数据元素 pull without 删除数组元素

    _.pull(array, [values]) 移除所有经过 SameValueZero 等值比较为 true 的元素 . without 不会修改原数组 <!DOCTYPE html> ...

  8. android源代码分析 android toast使用具体解释 toast自己定义

    在安卓开发过程中.toast使我们常常使用的一个类.当我们须要向用户传达一些信息,可是不须要和用户交互时,该方式就是一种十分恰当的途径. 我们习惯了这样使用toast:Toast.makeText(C ...

  9. C++14系列(1):Linux下C++14开发环境配置

    g++安装 參考地址: http://sysads.co.uk/2014/07/install-gcc-gnu-4-9-1-on-ubuntu-14-04/ 当前Ubuntu的LTS版本号为14.04 ...

  10. Python-PyQt4学习笔记

    1.每个应用必须创建一个 QtGui.QApplication(sys.argv), 此时 QtGui.qApp 为此应用的实例 app = QtGui.QApplication(sys.argv) ...