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

相关推荐
piepis4 分钟前
Linux 下升级 Python 3.7 → 3.9(离线)并内网安装本地python-packages
linux·运维·python
SP八岐大兔6 分钟前
Ollama安装及运行模型
linux·服务器·ollama
深念Y7 分钟前
Nginx和Spring Cloud Gateway
运维·服务器·网络·网关·nginx·spring cloud·微服务
困惑阿三8 分钟前
全栈部署排雷手册:从 405 报错到飞书推送成功
服务器·前端·后端·nginx·阿里云·node.js·飞书
野犬寒鸦14 分钟前
从零起步学习JVM|| 第二章:JVM基本组成及JVM内存区域详解
服务器·开发语言·后端·学习·面试·职场和发展
vx-bot55566617 分钟前
企业微信ipad协议的防封号技术体系与策略实践
服务器·企业微信·ipad
菩提树下的凡夫25 分钟前
基于C++语言的Onnx CUDA加速部署推理
linux·运维·人工智能
渔民小镇27 分钟前
告别 Redis/MQ —— ionet 分布式事件总线实战
java·服务器·分布式
Lyre丶27 分钟前
GAMIT netsel模块子网划分与解算
linux·gamit
Predestination王瀞潞32 分钟前
4.3.2 存储->微软文件系统标准(微软,自有技术标准):NTFS(New Technology File System)新技术文件系统
linux·microsoft·ntfs