咨询热线:4006-75-4006
售前:9:00-23:30 备案:9:00-18:00 技术:7*24h
Linux centos7运行yum遇到There are no enabled repos.问题的解决办法
蓝队云小课堂:
centos7运行yum报如下提示:
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>
运行
yum repolist all
0
尝试:
yum -y install yum-utils
如果不能运行先试着更换yum源:
先备份源:
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
然后
wget -O /etc/yum/repos.d/CentOS-Base.repo http://www.landui.com/repo/Centos-7.repo
或者
curl -o /etc/yum/repos.d/CentOS-Base.repo http://www.landui.com/repo/Centos-7.repo
文件目录看好:
/etc/yum/repos.d/
很快下载完成。
运行命令生成缓存
yum clean all
yum makecache
测试
yum -y install yum-utils
成功。
更多小知识,可联系蓝队云一起探讨。