解决Couldn't resolve host 'mirrorlist.centos.org
这个错误引起主要是因为环境读取不到yun引起的可以考虑/etc/sysconfig/network-scripts/ifcfg-eth0 配置出错导致网络不通。或者/etc/resolv.conf的DNS配置出错。或者可以考虑清楚yum缓存影响(yum clean all)
vi /etc/resolv.conf
nameserver 202.106.0.20(今天又出现此错误,这个nameserver加进去就好了。记得配置静态ip的话DNS也需要加入 然后update yum试试成功就OK了)
(下面是网上找到比较有用资料)
今天在linux环境通过yum安装软件报了以下错误:
[root@multi-mysql 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地址:
[root@multi-mysql ~] # vim /etc/resolv.conf
nameserver 8.8.8.8
nameserver 202.106.0.20
|
重启网络服务
[root@multi-mysql ~] # /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安装,正常
[root@multi-mysql ~] # 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
......此处省略
|
转载于:https://www.cnblogs.com/yaohaitao/p/5361639.html
解决Couldn't resolve host 'mirrorlist.centos.org相关推荐
- docker build 没有网络 执行dockerfile中yum报错 curl#6 - “Could not resolve host: mirrorlist.centos.org 解决方法
报错现象 Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo= ...
- 【转】解决yum安装软件报Couldn't resolve host 'mirrorlist.centos.org问题
转自:http://blog.51cto.com/oldcat1981/1719825 今天在linux环境通过yum安装软件报了以下错误: [root@multi-mysql yum.repos.d ...
- linux yum错误 14: PYCURL ERROR 6 - Couldn't resolve host 'mirrorlist.centos.org'
这个错误主要是因为DNS引起的 今天在linux环境通过yum安装软件报了以下错误: [root@multi-mysql yum.repos.d]# yum install ncurses devel ...
- linux安装软件时提示找不到镜像的问题:Couldn't resolve host 'mirrorlist.centos.org'
问题: [root@cddserver2 ~]# yum -y install gcc-* Loaded plugins: fastestmirror, presto Could not retrie ...
- Linux学习笔记008---Centos7中Couldn't resolve host 'mirrorlist.centos.org'
JAVA技术交流QQ群:170933152 这个问题,由于本地上不了网: 是因为没有配置dns解析 centos中配置dns解析: [root@sulei sulei]# yum install do ...
- CentOS网络设置 couldn‘t resolve host ‘mirrorlist.centos.org问题解决
CentOS网络设置 couldn't resolve host 'mirrorlist.centos.org问题解决 参考文章: (1)CentOS网络设置 couldn't resolve hos ...
- yum源报错 提示 Couldnt resolve host mirrorlist.centos.org
centos的yum源不用配置,装机之后就能使用,如遇到如此提示: Loaded plugins: fastestmirror, refresh-packagekit, security Loadin ...
- 记一次“Could not resolve host: mirrorlist.centos.org; 未知的错误“的解决过程
小白要在linux上装git. 直接输入yum -y install git 一通百度,说是网络没设置,跟着一通操作还是没解决!! 这时候转折来了 ping www.baidu.com 也不通 考虑是 ...
- CentOS报错:“Could not resolve host: mirrorlist.centos.org; Unknown error“
在电脑上安装了VMware Workstation Pro, 安装了一个虚拟机想要安装docker,在执行如下yum命令 [root@10 ~]# sudo yum install -y yum-ut ...
最新文章
- Android 6.0 PowerManagerService状态分析
- 软件设计师 -主观题总结
- Python爬虫教程之Scrapy 框架
- Linux错误 libXext.so.6: cannot open shared object file
- PostgreSQL Json字段作为查询条件的解决方案
- python中的shallow copy 和 deep copy
- Spring @Autowired批注
- Hive sql语句必练50题
- 《敏捷制造——敏捷集成基础结构设计》——2.3 集成基础结构数据访问模型
- 小菜找实习——阿里3.25场笔试第一题(矩阵数组最小差值和)
- 铺地毯(NOIP真题)
- 仿射密码解密(Affine Cipher)
- idea怎么看jdk版本_怎么看自己的jdk版本
- 深入MTK平台bootloader启动之【 Pre-loader -> Lk】分析笔记
- #Reading Paper# 【序列推荐】ICKM 2022 RETR:Recommender Transformers with Behavior Pathways
- 零线和地线的区别,示波器如何测量市电?
- 微信小程序实战练习(仿五洲到家微信版)
- 会议及作用篇--项目管理(十七)
- 郭晶晶成功瘦身中环逛街 产后专心相夫教子
- 安装苹果mac系统,提示没有符合安装资格的软件包
热门文章
- 在Spring.Net中对于NHibernate.Caches.Prevalence的使用
- Packet Tracer 5.0配置cisco路由器详细说明
- 愿...统一沟通...易行天下!
- Linux shell编程与实践(五)之shell程序中循环结构
- ORACLE的直方图的一些试验
- Javascript 将时间戳显示为“多久前”
- Web 架构师的能力(转)
- 增加CentOS File Descriptors
- 通过XmlDocument读写Xml文档(转)
- MySQL 5.1 的作业调度