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
To enable custom repositories:
yum-config-manager –enable
运行
yum repolist all
0
尝试:
如果不能运行先试着更换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
测试
成功。