码迷,mamicode.com
首页 > 系统相关 > 详细

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

时间:2019-04-03 09:35:41      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:原因   data   oca   conf   x86   names   4.4   repo   pre   

问题:
[root@cddserver2 ~]# yum -y install gcc-*
Loaded plugins: fastestmirror, presto
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 retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

原因:
 dns服务器没有配置正确

解决办法:
1、打开文件/etc/resolv.conf在其中添加:
nameserver 8.8.8.8
nameserver 8.8.4.4
search localdomain

2、然后重启网卡:使用命令: service network restart

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

标签:原因   data   oca   conf   x86   names   4.4   repo   pre   

原文地址:https://www.cnblogs.com/waw/p/10646678.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!