如何查找一个命令由哪个rpm安装&&rpm 的相关查询方法

Posted shanhua-fu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何查找一个命令由哪个rpm安装&&rpm 的相关查询方法相关的知识,希望对你有一定的参考价值。

[root@test-can-nginx src]# which python3
/usr/bin/python3
[root@test-can-nginx src]# rpm -qf /usr/bin/python3
python34-3.4.8-1.el6.x86_64
[root@test-can-nginx src]# rpm -ql python34-3.4.8-1.el6.x86_64
/usr/bin/pydoc3
/usr/bin/pydoc3.4
/usr/bin/python3
/usr/bin/python3.4
/usr/bin/python3.4m
/usr/bin/pyvenv
/usr/bin/pyvenv-3.4
/usr/share/doc/python34-3.4.8
/usr/share/doc/python34-3.4.8/LICENSE
/usr/share/doc/python34-3.4.8/README
/usr/share/man/man1/python3.1.gz
/usr/share/man/man1/python3.4.1.gz
[root@test-can-nginx src]# rpm -qa|grep python
setools-libs-python-3.3.7-4.el6.x86_64
policycoreutils-python-2.0.83-30.1.el6_8.x86_64
rpm-python-4.8.0-55.el6.x86_64
newt-python-0.52.11-3.el6.x86_64
python34-tkinter-3.4.8-1.el6.x86_64
python3-rpm-macros-3-13.el6.noarch
python34-tools-3.4.8-1.el6.x86_64
libsemanage-python-2.0.43-5.1.el6.x86_64
python-libs-2.6.6-66.el6_8.x86_64
libproxy-python-0.3.0-10.el6.x86_64
python-urlgrabber-3.9.1-11.el6.noarch
python-iniparse-0.3.1-2.1.el6.noarch
python34-libs-3.4.8-1.el6.x86_64
python-rpm-macros-3-13.el6.noarch
libselinux-python-2.0.94-7.el6.x86_64
python34-devel-3.4.8-1.el6.x86_64
audit-libs-python-2.4.5-6.el6.x86_64
python-2.6.6-66.el6_8.x86_64
python-pycurl-7.19.0-9.el6.x86_64
python34-3.4.8-1.el6.x86_64
python-srpm-macros-3-13.el6.noarch
[root@test-can-nginx src]# rpm -qi python34-3.4.8-1.el6.x86_64
Name        : python34                     Relocations: (not relocatable)
Version     : 3.4.8                             Vendor: Fedora Project
Release     : 1.el6                         Build Date: Mon 09 Apr 2018 08:34:28 PM CST
Install Date: Mon 06 Aug 2018 04:05:31 PM CST      Build Host: buildvm-09.phx2.fedoraproject.org
Group       : Development/Languages         Source RPM: python34-3.4.8-1.el6.src.rpm
Size        : 31182                            License: Python
Signature   : RSA/8, Mon 09 Apr 2018 08:57:46 PM CST, Key ID 3b49df2a0608b895
Packager    : Fedora Project
URL         : http://www.python.org/
Summary     : Version 3 of the Python programming language aka Python 3000
Description :
Python 3 is a new version of the language that is incompatible with the 2.x
line of releases. The language is mostly the same, but many details, especially
how built-in objects like dictionaries and strings work, have changed
considerably, and a lot of deprecated features have finally been removed.

 

以上是关于如何查找一个命令由哪个rpm安装&&rpm 的相关查询方法的主要内容,如果未能解决你的问题,请参考以下文章

linux中如何查看文件安装在哪个目录

linux安装rpm包时有的有依赖关系,如何强制安装?

Linux(centos)下安装卸载命令rpm,make install使用方法

Linux下怎样检查?如何查看软件包已经安装?

软件管理——rpm&dpkgyum&apt-get

linux怎么查看软件的安装目录