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

相关推荐
AI+程序员在路上1 小时前
Linux网桥内核配置与使用
linux·网络
济6171 小时前
linux(第十六期)--按键输入实验-- Ubuntu20.04
linux·运维·服务器
nbsaas-boot1 小时前
Linux 服务(systemd)最完整使用文档
linux·运维·服务器
xin_nai1 小时前
TCP/IP协议
服务器·网络·tcp/ip
不染尘.2 小时前
Linux的基本管理及命令(下)
linux·windows·ssh
IT 行者2 小时前
Spring Security OAuth2 ID Token 生成机制深度解析
服务器·spring
三花猫咪2 小时前
UBUNTU串口打印终端,X86主机变开发板
linux·运维·嵌入式硬件·ubuntu
HalvmånEver2 小时前
Linux:深入剖析 System V IPC上(进程间通信八)
linux·运维·数据库·c++·system v·管道pipe
EndingCoder2 小时前
泛型类和高级用法
linux·运维·前端·ubuntu·typescript
BIBI20492 小时前
CentOS 7 安装 MongoDB
linux·mongodb·centos·nosql·环境搭建·安装教程·服务器运维