问题
[root@zf-test-web01-4 ~]# yum install rng-tools
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
You can enable repos with yum-config-manager --enable <repo>
红色部分问题解决如下:
-bash-4.2# vi /etc/yum/pluginconf.d/fastestmirror.conf
[main]
enabled=0
verbose=0
always_print_best_host = true
socket_timeout=3
# Relative paths are relative to the cachedir (and so works for users as well
# as root).
hostfilepath=timedhosts.txt
maxhostfileage=10
maxthreads=15
#exclude=.gov, facebook
把enabled=1改为enabled=0
再次执行yum安装,仍报错
[root@zf-test-web01-4 ~]# yum install -y rng-tools
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
You can enable repos with yum-config-manager --enable <repo>
也就是蓝色部分,解决办法:
1. 查看centos7.2系统本身所安装的那些yum 软件包
[root@zf-test-web01-4 ~]# rpm -qa|grep yum
yum-plugin-fastestmirror-1.1.31-34.el7.noarch
yum-metadata-parser-1.1.4-10.el7.x86_64
yum-3.4.3-132.el7.centos.0.1.noarch
[root@zf-test-web01-4 ~]#
2. 卸载这些软件包
[root@zf-test-web01-4 ~]# rpm -e yum-plugin-fastestmirror-1.1.31-34.el7.noarch --nodeps
warn