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 -y install yum-utils

然后你查看你的/etc/yum.repos.d文件夹下有没有出现CentOS-Base.repo文件

centos7运行yum报如下提示:Run "yum repolist all" to see the repos you have

如果不能运行先试着更换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

 

如果wget不能安装使用,就自己在网上下载scp移动到目录下执行下面命令:

yum clean all
yum makecache

安装完成后,再执行命令就可以了

centos7运行yum报如下提示:Run "yum repolist all" to see the repos you have

 

 

 

相关文章:

  • 2020-10-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
  • 2021-07-16
  • 2021-09-04
猜你喜欢
  • 2021-04-07
  • 2021-09-24
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案