在使用yum时报错Loaded plugins: fastestmirror

在使用yum时报错Loaded plugins: fastestmirror

在我安装更高版本的gcc编译器时,发现了这个问题

image-20230710114909083

意思是加载插件,加载后面两个插件,查阅得知其中fastestmirror是yum的一个加速插件,这个提示意思是这个插件不能使用,那么就先把他禁用了。

  • 第一步:输入指令打开配置文件
sudo vim /etc/yum/pluginconf.d/fastestmirror.conf

1: /e/y/p/fastestmirror.conf  ⮀ ⮂⮂ buffers
1 [main]
2 enabled=1
3 verbose=0
4 always_print_best_host = true
5 socket_timeout=3
6 # Relative paths are relative to the cachedir (and so works for users as well
7 # as root).
8 hostfilepath=timedhosts.txt
9 maxhostfileage=10
10 maxthreads=15
11 #exclude=.gov, facebook
12 #include_only=.nl,.de,.uk,.ie

  • 第二步:把第二行的enabled=1改0即禁用该插件

image-20230710115854876

  • 第三步:修改yum的配置文件

输入指令打开yum的配置文件

sudo vim /etc/yum.conf

1 [main]
2 cachedir=/var/cache/yum/ b a s e a r c h / basearch/ basearch/releasever
3 keepcache=0
4 debuglevel=2
5 logfile=/var/log/yum.log
6 exactarch=1
7 obsoletes=1
8 gpgcheck=1
9 plugins=1
10 installonly_limit=5

  • 第四步:将plugins由1改0即不使用插件

image-20230710120346515

希望这篇文章对你有帮助~

猜你喜欢

转载自blog.csdn.net/m0_71841506/article/details/131636052