关于yum安装后提示There are no enabled repos Run "yum repolist all"..的问题解决

关于yum安装后提示There are no enabled repos Run “yum repolist all”…的问题解决

1)、一般情况下是因为wget未安装导致的,先去官网下载对应的wget,我的是centos7,地址是http://mirrors.163.com/centos/7/os/x86_64/Packages/,如果是centos5或6版本的就改为http://mirrors.163.com/centos/5/os/x86_64/Packages/、http://mirrors.163.com/centos/6/os/x86_64/Packages/

2)、下载完导入到centos下执行安装
rpm -ivh --force --nodeps wget-1.14-18.el7.x86_64.rpm

3)、备份CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

4)、下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份),同样在官网去下载

5)、运行命令生成缓存
yum clean all
yum makecache
结果如图:
关于yum安装后提示There are no enabled repos Run
6)、再用yum install … 试试,成功!

你可能感兴趣的:(关于yum安装后提示There are no enabled repos Run "yum repolist all"..的问题解决)