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

相关推荐
SUPER52661 小时前
FastApi项目启动失败 got an unexpected keyword argument ‘loop_factory‘
java·服务器·前端
一只小bit1 小时前
MySQL 库的操作:从创建配置到备份恢复
服务器·数据库·mysql·oracle
利刃大大2 小时前
【高并发服务器】二、时间轮定时器设计与实现
服务器·项目·cpp·高并发服务器
青草地溪水旁4 小时前
linux信号(14)——SIGALRM:从“手机闹钟”看SIGALRM:进程的非阻塞定时神器
linux·信号机制
心灵宝贝4 小时前
libopenssl-1_0_0-devel-1.0.2p RPM 包安装教程(openSUSE/SLES x86_64)
linux·服务器·数据库
BullSmall5 小时前
linux zgrep命令介绍
linux·运维
emma羊羊6 小时前
【文件读写】图片木马
linux·运维·服务器·网络安全·靶场
wdfk_prog6 小时前
闹钟定时器(Alarm Timer)初始化:构建可挂起的定时器基础框架
java·linux·数据库
2301_818411557 小时前
Ubuntu之apt更新源
linux·运维·ubuntu
迎風吹頭髮7 小时前
UNIX下C语言编程与实践32-UNIX 僵死进程:成因、危害与检测方法
服务器·c语言·unix