0
点赞
收藏
分享

微信扫一扫

Linux使用yum时报错:One of the configured repositories failed (CentOS-7 - Base - mirrors.aliyun.com)等

Separes 2022-03-11 阅读 48
linux

这几天在学习yum的时候报错,尝试了很多办法,包括换镜像阿里云、163等的云,或者干脆先在Windows下载.repo文件再共享到Linux虚拟机再使用yum依然报错,而且错误越来越多,大概有以下几种:
错误1:[Errno -1] Error importing repomd.xml for base: Damaged repomd.xml file
错误2:[Errno 14] curl#6 - “Could not resolve host: mirrors.cloud.aliyuncs.com; 未知的错误”
错误3:One of the configured repositories failed (CentOS-7 - Base - mirrors.aliyun.com),and yum doesn’t have enough cached data to continue.

在查找了许多资料后,确定了以上这些错误发生的原因:Linux无法连接到外网
但是我的Linux明明可以ping通外网,却还是不行。
折磨了许久之后,重点来了:ping通外网不代表可以进行下载,如果你的网络是需要验证的话,是无法进行下载的!!!
因为我是在学校学习的,连的是校园网,而校园网是需要验证所以Linux无法进行下载!!

所以解决上述问题的方法是:

  1. 确保你的网络可以ping通外网
  2. 确保你的网络不需要上网验证,否则换一个网络
举报

相关推荐

0 条评论