跳到主要内容
帮助中心

新闻公告

产品更新、运营公告与行业观察
一手消息,第一时间同步给你

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

成功。

本文链接
返回本栏目
工单