【转】解决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://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was

14: PYCURL ERROR 6 - "Couldn‘t resolve host ‘mirrorlist.centos.org‘"

Error: Cannot find a valid baseurl for repo: base

从字面意义上看是不能解析mirrorlist.centos.org这个地址,应该是跟dns网络配置有关系,最后解决方法是在DNS域名解析的配置文件增加DNS服务器的IP地址:

[[email protected] ~]# vim /etc/resolv.conf

nameserver 8.8.8.8

nameserver 202.106.0.20

注:我只写了第一句就可以了……

重启网络服务

[[email protected] ~]# /etc/init.d/network restart

Shutting down interface eth0: [ OK ]

Shutting down loopback interface: [ OK ]

Bringing up loopback interface: [ OK ]

Bringing up interface eth0: Determining if ip address 192.168.1.202 is already in use for device eth0...

[ OK ]

重新yum安装,正常

[[email protected] ~]# yum install nmap -y

Loaded plugins: fastestmirror, security

Loading mirror speeds from cached hostfile

* base: mirrors.yun-idc.com

* extras: mirrors.yun-idc.com

* updates: mirrors.yun-idc.com

base | 3.7 kB 00:00

base/primary_db | 4.6 MB 00:01

extras | 3.4 kB 00:00

extras/primary_db | 33 kB 00:00

updates | 3.4 kB 00:00

updates/primary_db | 2.6 MB 00:00

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package nmap.x86_64 2:5.51-4.el6 will be installed

--> Finished Dependency Resolution

......此处省略

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

原文地址:https://www.cnblogs.com/wangjuns8/p/8270017.html

时间: 2024-10-18 08:30:27

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

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

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

[原]linux安装软件时提示找不到镜像的问题:Couldn't resolve host 'mirrorlist.centos.org'

问题:[[email protected] ~]# yum -y install gcc-*Loaded plugins: fastestmirror, prestoCould not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.cent

linux安装软件时提示找不到镜像的问题:Couldn't resolve host 'mirrorlist.centos.org'

问题:[[email protected] ~]# yum -y install gcc-*Loaded plugins: fastestmirror, prestoCould not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.cent

解决Couldn't resolve host 'mirrorlist.centos.org

这个错误引起主要是因为环境读取不到yun引起的可以考虑/etc/sysconfig/network-scripts/ifcfg-eth0 配置出错导致网络不通.或者/etc/resolv.conf的DNS配置出错.或者可以考虑清楚yum缓存影响(yum clean all) (下面是网上找到比较有用资料) 今天在linux环境通过yum安装软件报了以下错误: [[email protected] yum.repos.d]# yum install ncurses devel -y Loaded 

解决 "Could not resolve host: mirrorlist.centos.or

解决 "Could not resolve host: mirrorlist.centos.org; 未知的错误" 安装yum报以下错误:错误引起主要是因为环境读取不到yun引起的.可以考虑/etc/sysconfig/network-scripts/ifcfg-eth0 配置出错导致网络不通.或者/etc/resolv.conf的DNS配置出错.或者可以考虑清楚yum缓存影响(yum clean all)经过尝试之后,以下步骤解决了我的问题:vi /etc/resolv.conf n

"Could not resolve host: mirrorlist.centos.org; Unknown error"解决方法

这两天学习历程可谓历尽坎坷,昨天在vSphere Client中安装完CentOS系统后,今天尝试在系统中安装mysql数据库. 由于刚接触Linux,所以对于一些常用指令和操作并不熟悉,也是一边百度一边操作的,所以对照博文进行mysql在线安装: wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.26-linux-glibc2.12-x86_64.tar.gz 回车确认时出现第一个问题:bash:wget:command not

Couldn't resolve host 'mirrorlist.centos.org'解决办法

今天在服务器上安装oneinstack时, 输入命令: wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz 出现: Couldn't resolve host 'mirrorlist.centos.org' 无法解析 解决方法: [[email protected] ~]# vim /etc/resolv.conf nameserver 8.8.8.8 就好了. 不要怕问题,所有的问题,都是让你收获答案来的. ----------  招

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,这

【问题】yum安装软件报错ERROR:dbus.proxies

转自:Yum安装报错:ERROR:dbus.proxies 环境: [红帽企业Linux.6.4.服务器版].rhel-server-6.4-x86_64-dvd(ED2000.COM).iso 安装时选用Software Development Workstation 问题描述: yum安装DHCP服务时输出 [[email protected] yum.repos.d]# yum list | grep dhcp dhcp-common.x86_64 12:4.1.1-34.P1.el6 @