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

相关推荐
紫郢剑侠17 小时前
飞秋@Windows +iptux@Linux,打造内网跨平台IM环境
linux·运维·服务器·im·qq
保持低旋律节奏17 小时前
linux——调试
linux·运维·服务器
牛奶咖啡1317 小时前
Linux系统故障排查思路实践教程(下)
linux·运维·服务器·su命令切换用户问题解决·文件打开过多问题解决·linux网络故障问题解决·linux故障排查思路
coder4_17 小时前
Linux 数据同步全攻略:NFS 共享、inotify+rsync 与 sersync 实战指南
linux·rsync·文件共享·nfs·数据同步·inotify·实时备份
Lynnxiaowen18 小时前
今天我们继续学习kubernetes内容Helm
linux·学习·容器·kubernetes·云计算
Bigan(安)18 小时前
【奶茶Beta专项】【LVGL9.4源码分析】08-theme主题管理
linux·c语言·mcu·arm·unix
小汐睡着了18 小时前
解决虚拟机VMware与宿主机网络不通的问题-error
linux·网络·redhat
xdxghy092118 小时前
mini centos7+k3s部署(镜像拉取解决版)
linux·运维·服务器·阿里云·运维开发
了一梨18 小时前
外设与接口:按键输入 (libgpiod)
linux·c语言
爱潜水的小L19 小时前
自学嵌入式day30,回收进程
java·linux·服务器