Linux系列之yum下载wget提示 Run “yum repolist all“ to see the repos you have.(针对CentOS系统)

本文讲述了在 CentOS 中遇到 yum 安装 wget 报 'There are no enabled repos.' 错误的解决办法,包括检查并添加缺失的repo文件,以及确认 CentOS 版本以获取对应 repo。
摘要由CSDN通过智能技术生成

在安装确实命令的镜像时,我使用的命令是:

yum install -y wget

命令还是强制下载wget命令,但是就直接报错了,报错信息如下:

[root@localhost ~]# yum install -y wget
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 To enable Red Hat Subscription Management repositories:
     subscription-manager repos --enable <repo>
 To enable custom repositories:
     yum-config-manager --enable <repo>

这个错出现的原因可能是:没有先安装wget源,就把源给备份了


解决方案:

下载对应版本repo文件, 放入/etc/yum.repos.d/里,下载地址:CentOS镜像使用帮助

查看自己CentOS的版本,下载对应的repo文件,查看版本的命令是:cat /etc/centos-release

下载的文件放到指定位置之后,在执行下载wget命令,就会发现一切都好了!

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值