解决yum安装软件报Couldn't resolve host 'mirrorlist.centos.org问题
2015-12-05 12:58
483 查看
今天在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 ......此处省略
相关文章推荐
- linux 程序调试
- 看我linux(ubuntu)下的64位编译器编译32位程序
- 源码分析:动态分析 Linux 内核函数调用关系
- linux下的系统调用函数到内核函数的追踪
- CentOS学习日记:PostgreSQL篇
- Linux_FTP服务器
- #Linux学习笔记# Linux系统查看文件内容的命令
- 在Linux下创建分区和文件系统的方法详解
- Linux Is Not Matrix——repo浅解
- Linux串口驱动(8250)的编写与调试
- Linux_Index
- Linux init 系列一 System V风格
- Linux 内存管理子系统
- 第一章 Linux系统简介
- 如何在CentOS 7安装Node.js
- Linux本地socket通信--AF_UNIX
- Linux搭建NFS提供磁盘给Windows使用
- 怎么在ubuntu麒麟版上安装谷歌浏览器chorme 的 flash 来看电影(简单且直接的方法)
- LINUX ACL访问控制列表,SELINUX安全性基本总结
- linux解压命令笔记