列出 RPM 的供应商信息
要列出所有带有供应商信息的 rpm,请使用 -queryformat(-qf) 选项。
# rpm -qa --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH} %{VENDOR}\n'
示例输出:
[root@onitroad ~]# rpm -qa --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH} %{VENDOR}\n' python3-pyparted-3.11.0-13.el8.x86_64 CentOS python3-gobject-base-3.28.3-1.el8.x86_64 CentOS libvirt-daemon-driver-secret-4.5.0-42.module_el8.2.0+320+13f867d7.x86_64 CentOS gnome-screenshot-3.26.0-3.el8.x86_64 CentOS ...
https://onitroad.com 更多教程
列出第 3 方或者非本地包
要列出所有 CentOS 未提供的软件包,请运行以下命令:
# rpm -qa --qf "%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} %{VENDOR}\n" | awk '{if(!="CentOS") print[root@onitroad ~]# rpm -qa --qf "%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} %{VENDOR}\n" | awk '{if(!="CentOS") print;}'# rpm -qi [rpm_name];}' gpg-pubkey-8483c65d-5ccc5b19-(none) (none) amazon-ssm-agent-2.3.1644.0-1-x86_64 Amazon.com gpg-pubkey-6963f07f-57fad2ec-(none) (none)
CentOS 8 服务器的示例输出:
# rpm -qi tree Name : tree Version : 1.7.0 Release : 15.el8 Architecture: x86_64 Install Date: Thu 27 Aug 2020 05:24:23 PM UTC Group : Unspecified Size : 111603 License : GPLv2+ Signature : RSA/SHA256, Tue 02 Jan 2019 01:53:45 AM UTC, Key ID 05b555b38483c65d
这是关于检查系统上已安装 rpm 的供应商的快速教程。
在某些情况下,自定义 rpm 包可能在特定系统或者环境上不兼容或者不支持。
这篇文章将确定 rpm 的供应商,这些供应商或者是第三方的,或者不是操作系统提供商的本地供应商。
更多信息
如果我们想了解更多特定的 rpm 包,检查包信息可能会有所帮助:
- 查询安装的rpm
# rpm -qpi [rpm_with_absolute_path]
例如:
# rpm -qpi /tmp/telnet-0.17-73.el8_1.1.x86_64.rpm Name : telnet Epoch : 1 Version : 0.17 Release : 73.el8_1.1 Architecture: x86_64 Install Date: (not installed) Group : Applications/Internet Size : 156776 License : BSD Signature : RSA/SHA256, Mon 13 Apr 2020 06:13:23 PM UTC, Key ID 05b555b38483c65d
- 查询存在于指定位置的包:
例如:
##代码##日期:2020-09-17 00:13:16 来源:oir作者:oir