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

问题:
[[email protected] ~]# 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'

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

时间: 2024-08-03 03:00:37

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

[原]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

安装xampp时提示找不到文件“-n”,提示没有安装Microsoft Visual C++ 2008 Redistributable Package (x86)

①安装xampp时提示找不到文件"-n": ②提示没有安装Microsoft Visual C++ 2008 Redistributable Package (x86). 解决方法如下:遇到这两个错误后不管它,继续安装.完成后下载Microsoft Visual C++ 2008 Redistributable Package (x86),可以到这里下载:http://download.csdn.net/detail/hqocshheqing/9479606,安装完这个之后双击xamp

【转】解决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

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

编译安装memcached时提示找不到gcc

今日帮同事装memcached时报错,提示找不到gcc,无奈之下我运行了yum install gcc*(一般执行yum -y install gcc gcc-c++ g++就可以把c和c++编译器装好了,大家千万不要学我,运行这个的话会装许多无关紧要的包,不但费时还占空间),结果问题依旧. 回想,继续回想,终于想起来...我之前执行了export CXX=/usr/bin/gcc44,实际上系统中并不存在"/usr/bin/gcc44"这个文件,相应的c++编译器应为"/u

Cent OS 6/7 中通过yum安装软件时提示cannot find a valid baseurl...的解决方法

目录 1 问题描述 2 解决方法一 (Cent OS 7中有效) 3 解决方法二 (Cent OS 7中无效) 1 问题描述 新申请了虚拟机, 系统版本是Cent OS 7.2. 在安装软件的过程中, 发现yum命令不能连接到远程仓库, 出现如下提示: [[email protected] ~]# yum install -y vim [[email protected] ~]# Error: cannot find a valid baseurl or repo:base/7/x86_64..

Linux安装软件时缺少依赖包的简单较完美解决方法!

大家在linux下源码安装时,有木有经常碰到缺少这个包那个包的,然后不知所措?看到最近有几个筒子安装thrift,安装python因缺少依赖包而进行不下去了.我用的是红帽,装系统的时候习惯把所有的有的没的都选择上,基本没有出现过缺少包的情况,大家可以试试. 如果装系统的时候忘了选择所有的包,来,这里有你想要的. 如果电脑可以联网,可以试试以下的yum命令,把命令copy过去贴到命令行执行下就OK了: yum -y install gcc gcc-c++ autoconf libjpeg libj

redhat linux安装软件时的问题

1.   签名校验 从 rpm版本 4.1 开始,在安装或升级软件包时会检查软件包的签名.如果签名校验失败,你就会看到类似以上的错误消息: 注:新的.只针对文件头的签名:错误消息:error: Header V3 DSA signature: BAD, key ID 0352860f 注:没有安装合适的钥匙来校验签名,消息中就会包含 NOKEY:错误消息:warning: V3 DSA signature: NOKEY, key ID 0352860f 由于yum安装了旧版本的GPG keys造

解决Win 10安装软件时提示:文件系统错误 (-1073740940)

1.win+R输入 gpedit.msc 2.左边计算机配置 windows设置——安全设置——本地策略——安全选项 3.在安全选项右边选择 用户账户控制:管理员批准模式中管理员的提升权限提示的行为,将选项改为不提示,直接提升