centos7 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源

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://mirrors.aliyun.com/repo/Centos-7.repo或者

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

 

posted @ 2021-06-19 11:09  Jerry`  阅读(1512)  评论(0编辑  收藏  举报