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

相关推荐
工具人555542 分钟前
复制cmd窗口所有文字快捷方式
服务器
RoboWizard2 小时前
高性能电脑热战寒冬 11月DIY配置推荐
linux·运维·服务器·电脑·金士顿
星释5 小时前
Rust 练习册 57:阿特巴什密码与字符映射技术
服务器·算法·rust
zl9798995 小时前
RabbitMQ-下载安装与Web页面
linux·分布式·rabbitmq
kitty_hi7 小时前
mysql主从配置升级,从mysql5.7升级到mysql8.4
linux·数据库·mysql·adb
顾安r7 小时前
11.20 开源APP
服务器·前端·javascript·python·css3
甄心爱学习7 小时前
计算机网络12
运维·服务器·网络
moringlightyn8 小时前
Linux---进程状态
linux·运维·服务器·笔记·操作系统·c·进程状态
go_bai8 小时前
Linux-线程2
linux·c++·经验分享·笔记·学习方法
shizhan_cloud8 小时前
DNS 服务器
linux·运维