如何过滤掉 yum 的警告消息?

如何过滤掉 yum 的警告消息?

我已经通过yum一些软件包安装如下:

$ yum install ambari-agent

安装过程中会出现很多警告(见下文)。是否可以阻止这些警告,但只看到发生错误时的错误?

预期输出应该是普通yum安装但没有警告。

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
              : manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package ambari-agent.x86_64 0:2.5.0.3-7 will be updated
---> Package ambari-agent.x86_64 0:2.6.1.0-143 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package            Arch         Version             Repository            Size
================================================================================
Updating:
 ambari-agent       x86_64       2.6.1.0-143         ambari-2.6.1.0        90 M

Transaction Summary
================================================================================
Upgrade  1 Package

Total download size: 90 M
Downloading packages:
No Presto metadata available for ambari-2.6.1.0
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : ambari-agent-2.6.1.0-143.x86_64                              1/2
Upgrading configs in /etc/ambari-agent/conf/ambari-agent.ini
Values will be updated from /etc/ambari-agent/conf/ambari-agent.ini.old except the following list: [('heartbeat', 'dirs'), ('heartbeat', 'state_interval')], ['stack', 'puppet', 'command', 'python']
  Cleanup    : ambari-agent-2.5.0.3-7.x86_64                                2/2
warning: file /var/lib/ambari-agent/cache/stacks/HDP/2.5/services/FALCON/configuration/oozie-site.xml: remove failed: No such file or directory
warning: file /var/lib/ambari-agent/cache/stacks/HDP/2.2/services/FALCON/configuration/oozie-site.xml: remove failed: No such file or directory
warning: file /var/lib/ambari-agent/cache/stacks/HDP/2.1/services/SMARTSENSE/package/files/view/smartsense-ambari-view-1.4.0.2.5.0.3-7.jar: remove failed: No such file or directory
warning: file /var/lib/ambari-agent/cache/stacks/HDP/2.1/services/FALCON/configuration/oozie-site.xml: remove failed: No such file or directory
warning: file /var/lib/ambari-agent/cache/stacks/HDP/2.1/services/FALCON/configuration: remove failed: No such file or directory
warning: file /var/lib/ambari-agent/cache/common-services/ZEPPELIN/0.6.0.2.5/quicklinks/quicklinks.json: remove failed: No such file or directory
warning: file /var/lib/ambari-agent/cache/common-services/ZEPPELIN/0.6.0.2.5/quicklinks: remove failed: No such file or directory

相关内容