当我列出更新时,我收到以下错误。服务器当前已在 ULN 注册。虽然这是一个警告,但我不希望在发出 yum 命令时显示以下消息。我发现订阅管理器插件已加载。如何禁用订阅管理器插件??
Loaded plugins: downloadonly, product-id, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
答案1
有两种可能的解决方案:
- 在插件配置文件中,禁用插件:
vim /etc/yum/pluginconf.d/subscription-manager.conf
enabled=0
- 注册到卫星
答案2
至少就我而言,RHEL 7.6/etc/yum/pluginconf.d/subscription-manager.conf
已经有了enabled=0
。
/etc/yum/pluginconf.d/enabled_repos_upload.conf
但是,有enabled=1
,并将其更改为enabled=0
可防止出现警告。
答案3
要通过 yum 命令行执行此操作,请使用--disableplugin subscription-manager
。此方法适用于脚本编写。
以下示例不会打印“未注册”消息:
# yum --disableplugin subscription-manager list installed | head -3
Loaded plugins: langpacks, product-id, search-disabled-repos
Installed Packages
GConf2.x86_64 3.2.6-8.el7 @anaconda/7.5
只是为了向您显示不提供标志将会打印“未注册”消息:
# yum list installed | head -5
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Installed Packages
GConf2.x86_64 3.2.6-8.el7 @anaconda/7.5