yum 安装出错--"Couldn't resolve host 'mirrors.aliyun.com'"

1.yum 安装出错

[[email protected] ~]#yum install mysql

[html] view plain copy

  1. [[email protected] ~]#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

[[email protected] ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

文末添加

DNS1=8.8.8.8
DNS2=8.8.4.4

3. 重启network 服务

[[email protected] ~]# service network restart

[plain] view plain copy

  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服务冲突

[plain] view plain copy

  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

[[email protected] ~]#  service NetworkManager stop

[plain] view plain copy

  1. Stopping NetworkManager daemon:                            [  OK  ]

6. 再次重启 network 服务

[[email protected] ~]#  service network restart

[plain] view plain copy

  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参数来屏蔽该检查

[[email protected] ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

文末添加

ARPCHECK=no

再次启动网卡

[plain] view plain copy

  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'"

时间: 2024-11-07 10:13:19

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

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.i686 != zlib-1.2.3-27.el6.x86_64?You could try using --skip-broken to work around the problem?You could try running: rpm -Va --nofiles --nodigest ? 原

yum update 出错

: mirrors.163.com; Unknown error" Trying other mirror. yum-utils-1.1.31-52.el7.noarch FAILED http://ap.stykers.moe/centos/7.7.1908/os/x86_64/Packages/yum-utils-1.1.31-52.el7.noarch.rpm: [Errno 14] curl#6 - "Could not resolve host: ap.stykers.moe

yum安装指定路径和配置文件出错

错误提示如下 [root@newings yum.repos.d]# yum -c /etc/yum.conf --installroot=/usr/local/wget install wget -y Loaded plugins: fastestmirror Determining fastest mirrors * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com http

解决centos yum源配置出现Couldn't resolve host 问题

http://mirrors.163.com/centos/6/os/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.163.com'" Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify i

使用yum 安装软件出现一下错误:” PYCURL ERROR 6

Loaded plugins: fastestmirrorDetermining fastest mirrorsCould not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"Could not get

【转】解决yum安装软件报Couldn't resolve host 'mirrorlist.centos.org问题

转自:http://blog.51cto.com/oldcat1981/1719825 今天在linux环境通过yum安装软件报了以下错误: [[email protected] yum.repos.d]# yum install ncurses devel -y Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http

yum 安装时错误 Errno 14 Couldn't resolve host 解决办法

是由于DNS解析错误引起的 修改/etc/resolv.conf 添加一个nameserver 8.8.8.8完成 yum 安装时错误 Errno 14 Couldn't resolve host 解决办法

yum 安装时错误 Couldn't resolve host 解决办法

修改/etc/resolv.conf 添加:nameserver 8.8.8.8 yum 安装时错误 Couldn't resolve host 解决办法

linux安装命令出错(could not resolve host mirrorlist.centos.org)

本次问题出现在虚拟机安装的centos7系统之后,使用yum命令安装wget命令(yum -y install wget),出现could not resolve host mirrorlist.centos.org,看到一篇文章回答的不错 首先看看虚拟机是否有网络连接,尝试ping一下本地ip,如果ping的时候直接出现network is unreachable,那么说明虚拟机网络配置有问题, 打开:/etc/resolv.conf文件,配置DNS:这里根据系统配置,有的是8.8.8.8,这