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

相关推荐
magic 24517 分钟前
第五章:Linux用户管理
linux·运维·服务器
前进的程序员17 分钟前
C++ 在 Windows 和 Linux 平台上的开发差异及常见问题
linux·c++·windows
Wangyh0218 分钟前
Yocto Project 快速构建
linux
小叶子来了啊23 分钟前
信息系统运行管理员:临阵磨枪版
运维·服务器·数据库
-天涯7631 分钟前
5.13/14 linux安装centos及一些操作命令随记
linux·运维·服务器
佩奇的技术笔记1 小时前
CentOS系统中升级Python 3.12.2版本
linux·运维·服务器
Fireworkitte1 小时前
CentOS 和 RHEL
linux·centos
HackerKevn1 小时前
【项目】自主实现HTTP服务器:从Socket到CGI全流程解析
服务器·网络协议·http
云手机管家2 小时前
CDN加速对云手机延迟的影响
运维·服务器·网络·容器·智能手机·矩阵·自动化
zandy10112 小时前
如何快速入门-衡石科技分析平台
服务器·前端·科技·数据库管理员