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

相关推荐
墨风如雪12 小时前
甲骨文云(Oracle Cloud)最新注册防坑记录:被ABC了怎么办?
服务器
HHFQ13 小时前
在 systemd 场景下的 CPU 限制方式
linux
道清茗13 小时前
【RH294知识点汇总】第 9 章 《 自动执行 Linux 管理任务 》常见问题
linux·运维·服务器
山羊硬件Time13 小时前
自动化管理Linux的好工具:shell script
linux·嵌入式硬件·硬件工程师·基带工程·硬件开发
wj30558537814 小时前
Codex + Git 开发环境配置指南(WSL版)
linux·运维·git
星马梦缘15 小时前
如何切换window-ubuntu双系统【方案二】
linux·运维·ubuntu
丑八怪大丑16 小时前
Java网络编程
linux·服务器·网络
橙子也要努力变强16 小时前
信号捕捉底层机制-机理篇2
linux·服务器·c++
秋917 小时前
MySQL 8.0.46 全平台安装与配置详解(Windows/Linux/macOS)
linux·windows·mysql
小康小小涵17 小时前
基于ESP32S3实现无人机RID模块底层源码编译
linux·开发语言·python