基础环境
系统版本:anolis7.9
yum版本:3.4.3
异常出现场景
使用yum clean all
命令清理缓存时,出现以下显示
已加载插件:fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
正在清理软件源: extras kubernetes os updates
Cleaning up list of fastest mirrors
解决方案
要么进行注册,要么关闭这个功能,这里仅介绍后者
找到yum源调用订阅管理插件,通常在/usr/lib/yum-plugins/subscription-manager.py
这里。
查看文件内容找到这段
conduit.info(2, 'subscription-manager plugin disabled "%d" system repositories with respect of configuration in /etc/yum/pluginconf.d/subscription-manager.conf' % (disable_count))
可知该插件的配置文件在/etc/yum/pluginconf.d/subscription-manager.conf
编辑该配置文件如下
[main]
enabled=0
重新执行yum clean all
,显示如下
已加载插件:fastestmirror, langpacks, product-id, search-disabled-repos
正在清理软件源: extras kubernetes os updates
异常修复完毕。