CentOS使用中遇到的问题-Loadedplugins:fastestmirror

在centOS系统中,安装docker命令的时候报错

yum -y install docker
Loaded plugins: fastestmirror, langpacks
You need to be root to perform this command.

 解决办法如下

fastestmirror是yum的一个加速插件,这里是插件提示信息是插件不能用了。

不能用就先别用呗,禁用掉,先yum了再说。

1.修改插件的配置文件

# vi  /etc/yum/pluginconf.d/fastestmirror.conf  

[main]
enabled=1
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
#include_only=.nl,.de,.uk,.ie

enabled = 1//由1改为0,禁用该插件

...............................

2.修改yum的配置文件

# vi /etc/yum.conf

[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release

plugins=1//改为0,不使用插件

........................