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

相关推荐
Vcaker3 分钟前
Linux学习36-k8s集群升级及kube-vip高可用
linux·运维·学习
土星云SaturnCloud7 分钟前
边缘计算 + AI 视频存管一体机:快递末端网点分拣提效与安全管控实战方案
服务器·人工智能·ai·边缘计算
wdfk_prog18 分钟前
Wi-Fi Direct教程 02:从 wpa_cli main() 到 P2P_FIND——用源码注释追踪 CLI 控制命令发送
运维·服务器·网络·网络协议·ubuntu·p2p·wifi-direct
DD云验证26 分钟前
DD云验证,免费网络验证系统
服务器·python·易语言·网络验证·卡密验证
skywalk816327 分钟前
Deepseek harness的4种模式 配置文件内容
linux·人工智能·ubuntu·deepseek·harness
沫璃染墨1 小时前
《从零入门Linux系统篇(五十一):线程篇·四——pthread线程库详解:从线程创建到终止与分离》
linux·运维·服务器·开发语言·c++·系统架构·线程
YYRAN_ZZU1 小时前
GMSL开发加解串配置介绍
linux·嵌入式硬件
云计算练习生1 小时前
什么是上下文切换?进程切换时 CPU 到底在保存什么
linux·服务器·操作系统·进程切换
用户0510122572961 小时前
RGA(二)——RK3588 的核拓扑与能力差异
linux·嵌入式
用户0510122572961 小时前
RGA(一)——基础知识
linux·嵌入式