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

相关推荐
ALINX技术博客7 分钟前
【黑金云课堂】FPGA技术教程Linux开发:系统定制
linux·运维·fpga开发
M哥支付8 分钟前
什么是收付一体模式?
服务器·网络·其他·微信·金融
ShineWinsu18 分钟前
对于Linux:传输层协议UDP原理的解析
linux·c++·面试·udp·协议·传输层·计算机系统
2601_965798471 小时前
How to Build a Custom Artisan Store on WordPress: Crafti Theme Review
linux·服务器·数据库
mounter6251 小时前
深度解析 Linux 内核中的 iomap 子系统:历史、演进、核心机制与未来
linux·文件系统·linux kernel·kernel·iomap
luyun0202022 小时前
论坛里的小工具,吾爱出品
运维·服务器·windows
江湖有缘2 小时前
Docker实战 | 使用Docker部署EasyNode服务器面板工具
服务器·docker·容器
你怎么知道我是队长2 小时前
计算机虚拟存储管理与页面置换算法详解
服务器·网络·算法
养海绵宝宝的小蜗3 小时前
LVS(Linux Virtual Server)项目知识点总结
linux·运维·lvs
阿黎02144 小时前
Linux驱动
linux