解决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 -yLoaded plugins: fastestmirror, securityLoading mirror speeds from cached hostfileCould 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'"Error: Cannot find a valid baseurl for repo: base |
从字面意义上看是不能解析mirrorlist.centos.org这个地址,应该是跟dns网络配置有关系,最后解决方法是在DNS域名解析的配置文件增加DNS服务器的IP地址:
[root@multi-mysql ~]# vim /etc/resolv.confnameserver 8.8.8.8nameserver 202.106.0.20 |
重启网络服务
[root@multi-mysql ~]# /etc/init.d/network restartShutting 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 -yLoaded plugins: fastestmirror, securityLoading mirror speeds from cached hostfile * base: mirrors.yun-idc.com * extras: mirrors.yun-idc.com * updates: mirrors.yun-idc.combase | 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 ProcessResolving Dependencies--> Running transaction check---> Package nmap.x86_64 2:5.51-4.el6 will be installed--> Finished Dependency Resolution......此处省略 |
解决Couldn't resolve host 'mirrorlist.centos.org的更多相关文章
- 20200311_解决Could not resolve host: mirrorlist.centos.org
[root@localhost ~]# yum -y install wget 已加载插件:fastestmirror Determining fastest mirrors Could not re ...
- 【转】解决yum安装软件报Couldn't resolve host 'mirrorlist.centos.org问题
转自:http://blog.51cto.com/oldcat1981/1719825 今天在linux环境通过yum安装软件报了以下错误: [root@multi-mysql yum.rep ...
- "Could not resolve host: mirrorlist.centos.org; Unknown error"解决方法
这两天学习历程可谓历尽坎坷,昨天在vSphere Client中安装完CentOS系统后,今天尝试在系统中安装mysql数据库. 由于刚接触Linux,所以对于一些常用指令和操作并不熟悉,也是一边百度 ...
- couldnt resolve host mirrorlist.centos
解决centos 6.3 yum安装软件时找不到镜像问题 [root@nagios-server ~]# yum update –y Loaded plugins: fastestmirror Lo ...
- linux安装软件时提示找不到镜像的问题:Couldn't resolve host 'mirrorlist.centos.org'
问题:[root@cddserver2 ~]# yum -y install gcc-*Loaded plugins: fastestmirror, prestoCould not retrieve ...
- yum 安装报错:Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
[root@venn09 ~]# yum install -y vim Loaded plugins: fastestmirror Could not retrieve mirrorlist http ...
- 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误" One of the configured ...
- Could not resolve host: mirrorlist.centos.org Centos 7 Unkown error
安装Centos7(core)以后,网卡默认不会启用.这是一个大坑,直接报错,这是一个过度优化,有几个开发人员/运维人员安装centos7(core)不用ssh去连接服务器的. 报错如下: Loade ...
- CentOS报错:Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock32 error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
今天安装完带图形界面的CentOS 7后,在Terminal中运行yum安装命令时报了以下错误: Could not retrieve mirrorlist http://mirrorlist.cen ...
随机推荐
- List<> ,string[]和string的相互转换
1.string转换成string[]数组 string str = "aaa,bbb,ccc,dddd"; string[] strs = str.Split(','); 2.s ...
- 整理下webapi的一些琐碎事情
在使用webapi的时候我们会遇到一些问题比如 1.POST怎么请求 2.怎么兼容JSONP请求 3.怎么给指定端提供跨域的请求 4.怎么显示单独的models层的注释 问题一二其他人都玩的比较成熟的 ...
- Windows netsh
用法: netsh [-a AliasFile] [-c Context] [-r RemoteMachine] [-u [DomainName\]UserName] [-p Password | * ...
- Delphi 窗口置顶的方法
有几种窗口置顶的方法,简单的有: ShowWindow(窗口句柄,sw_ShowNormal); SetWindowPos(窗口句柄,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOV ...
- BZOJ 1040 (ZJOI 2008) 骑士
题目描述 Z国的骑士团是一个很有势力的组织,帮会中汇聚了来自各地的精英.他们劫富济贫,惩恶扬善,受到社会各界的赞扬. 最近发生了一件可怕的事情,邪恶的Y国发动了一场针对Z国的侵略战争.战火绵延五百里, ...
- go操作空指针导致supervisor进程服务挂机的坑
一.起因 在数据库中直接手动插入了某条记录,但由于该记录的某个字段的空值,与另一个字段的状态码不符合,在go程序中,突然操作了该空字段的指针,导致程序panic挂机. panic: runtime e ...
- SSM14-通过AOP实现日志记录
1.要求使用AOP思想,实现对每一个用户登陆后,将以下信息保存在数据库 1>登陆时间 2>退出时间 3>登录的IP地址 4>访问点URL(访问了那些Controller) 5& ...
- JAVA 设计模式之 工厂模式详解
一.简单工厂模式 简单工厂模式(Simple Factory Pattern)是指由一个工厂对象决定创建出哪一种产品类 的实例.属于创建型模式,但它不属于 GOF,23 种设计模式 (参考资料: ht ...
- element表单验证
rules: { name:[{ required: true, message: '请输入用户名', trigger: 'blur' },{ min: 2, max: 5, message: '长度 ...
- echars前端处理数据、pyechars后端处理数据
echars -- 后端给数据,前端根据数据做渲染 - echarts:https://www.echartsjs.com/zh/index.htmlhtml文件 <!DOCTYPE html& ...