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:
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.
postid
6946