在安装确实命令的镜像时,我使用的命令是:
yum install -y wget
命令还是强制下载wget命令,但是就直接报错了,报错信息如下:
[root@localhost ~]# 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>
这个错出现的原因可能是:没有先安装wget源,就把源给备份了
解决方案:
下载对应版本repo文件, 放入/etc/yum.repos.d/里,下载地址:CentOS镜像使用帮助
查看自己CentOS的版本,下载对应的repo文件,查看版本的命令是:cat /etc/centos-release
下载的文件放到指定位置之后,在执行下载wget命令,就会发现一切都好了!