Encountered a title error on a CentOS7 server:
[[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>
Nothing can be installed through yum, and I searched Solution, so record it.
The error message is as shown in the figure:
yum
The solution is:
Download the corresponding version repo file, put it in /etc/yum.repos.d/, and download Address: http://mirrors.163.com/.help/centos.html
***Because wget cannot be used on my machine, I downloaded it to local sftp***
Completed Finally, check whether there is a CentOS-Base.repo file in the /etc/yum.repos.d folder, and then generate a cache.
yum clean all
yum makecache
Finally, execute the command we reported the error again, and it is OK.

Tags: centos7 error, 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)];
postid
6946

Leave a Reply