CentOS7安装软件yum install 无法解析仓库URL

Determining fastest mirrors

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"

One of the configured repositories failed (Unknown),

and yum doesn't have enough cached data to continue. At this point the only

safe thing yum can do is fail. There are a few ways to work "fix" this:

1.备份原有镜像源:

sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

2.下载新的镜像源配置文件(例如阿里云):

sudo curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3.清理并重建缓存:

sudo yum clean all

sudo yum makecache

sudo yum install net-tools

相关推荐
HalvmånEver14 分钟前
Linux:线程同步
linux·运维·服务器·线程·同步
喵叔哟15 分钟前
06-ASPNETCore-WebAPI开发
服务器·后端·c#
Zach_yuan17 分钟前
自定义协议:实现网络计算器
linux·服务器·开发语言·网络
岁杪杪20 分钟前
关于运维:LINUX 零基础
运维·服务器·php
wdfk_prog33 分钟前
[Linux]学习笔记系列 -- [drivers][I2C]I2C
linux·笔记·学习
VekiSon42 分钟前
Linux内核驱动——杂项设备驱动与内核模块编译
linux·c语言·arm开发·嵌入式硬件
tianyuanwo44 分钟前
企业级NTP客户端配置指南:基于内部NTP服务器的实践
运维·服务器·ntp客户端
Y1rong1 小时前
linux之网络
linux
寄存器漫游者1 小时前
Linux 软件编程 - IO 编程
linux·运维·spring
_别来无恙_1 小时前
TFTP的使用Linux
linux·服务器