CentOS7报错There are no enabled repos. Run “yum repolist all” to see the repos you have

在一台CentOS7的服务器上遇到标题标错:
[[email protected] ~]# yum install -y wget
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
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什么都不能安装,搜索了下解决方法,所以记录下来。
报错信息如图:
yum
解决方法为:
下载对应版本repo文件, 放入/etc/yum.repos.d/里,下载地址:http://mirrors.163.com/.help/centos.html
***因为我这台机器wget也不能用,所以我是下载到本地sftp上去的***
完成后,查看/etc/yum.repos.d文件夹下是否有了CentOS-Base.repo文件,然后生成缓存。
yum clean all
yum makecache
最后再次执行我们之前报错的命令,已经OK了。

标签: centos7报错, no enabled repos, There are no enabled repos, yum repolist all

window._bd_share_config={“common”:{“bdSnsKey”:{},”bdText”:””,”bdMini”:”2″,”bdMiniList”:[“mshare”,”kaixin001″,”tsina”,”tsohu”,”tqq”,”renren”,”qzone”,”weixin”,”bdysc”,”bdxc”,”tqf”,”tieba”,”douban”,”bdhome”,”sqq”,”thx”],”bdPic”:””,”bdStyle”:”0″,”bdSize”:”24″},”slide”:{“type”:”slide”,”bdImg”:”2″,”bdPos”:”left”,”bdTop”:”100″},”selectShare”:{“bdContainerClass”:null,”bdSelectMiniList”:[“tsina”,”tqq”,”tsohu”,”qzone”,”renren”,”weixin”,”mshare”]}};with(document)0[(getElementsByTagName(‘head’)[0]||body).appendChild(createElement(‘script’)).src=’http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=’+~(-new Date()/36e5)];

发表评论

电子邮件地址不会被公开。 必填项已用*标注