首页 > 系统相关 >yum安装中关于Base.repo的报错问题

yum安装中关于Base.repo的报错问题

时间:2024-07-03 12:57:58浏览次数:3  
标签:repos repo Base yum aliyun repolist 报错

 用yum安装出现以下问题:

 确认自己的DNS配置正确,而且可以用连接公网,测试如下:

 查看repolist:是否为0,是的话继续下面操作

yum repolist

备份原来的Base.repo

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

 下载阿里的yum安装的Base.repo:

阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区 (aliyun.com)icon-default.png?t=N7T8https://developer.aliyun.com/mirror/?spm=a2c6h.13651104.mirror-detail.d1002.7c2d320cceNwH2

   注:一般wget这个命令是没有安装的,用下面这个也是可以的,亲自测试过

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

 再次查看repolist是否为0

yum repolist

 显示不为0后,就可以用yum命令安装了

标签:repos,repo,Base,yum,aliyun,repolist,报错
From: https://blog.csdn.net/zjp1997721452/article/details/140148593

相关文章