yum provides 反查询

yum provides  可以反查询到 你要使用的命令包含

在哪个包里 然后使用yum install 即可安装:

[root@git02 ~]# yum provides */nslookup
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* c7-media:
c7-media/filelists_db | 3.1 MB 00:00:00
32:bind-utils-9.9.4-61.el7.x86_64 : Utilities for querying DNS name servers
Repo : c7-media
Matched from:
Filename : /usr/bin/nslookup

zsh-5.0.2-28.el7.x86_64 : Powerful interactive shell
Repo : c7-media
Matched from:
Filename : /usr/share/zsh/5.0.2/functions/nslookup

[root@git02 ~]# yum install bind-utils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* c7-media:
Resolving Dependencies
--> Running transaction check
---> Package bind-utils.x86_64 32:9.9.4-61.el7 will be installed
--> Processing Dependency: bind-libs = 32:9.9.4-61.el7 for package: 32:bind-utils-9.9.4-61.el7.x86_64
--> Processing Dependency: liblwres.so.90()(64bit) for package: 32:bind-utils-9.9.4-61.el7.x86_64
--> Processing Dependency: libisccfg.so.90()(64bit) for package: 32:bind-utils-9.9.4-61.el7.x86_64
--> Processing Dependency: libisccc.so.90()(64bit) for package: 32:bind-utils-9.9.4-61.el7.x86_64
--> Processing Dependency: libisc.so.95()(64bit) for package: 32:bind-utils-9.9.4-61.el7.x86_64
--> Processing Dependency: libdns.so.100()(64bit) for package: 32:bind-utils-9.9.4-61.el7.x86_64
--> Processing Dependency: libbind9.so.90()(64bit) for package: 32:bind-utils-9.9.4-61.el7.x86_64
--> Running transaction check
---> Package bind-libs.x86_64 32:9.9.4-61.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================
Package Arch Version Repository Size
==========================================================================================
Installing:
bind-utils x86_64 32:9.9.4-61.el7 c7-media 204 k
Installing for dependencies:
bind-libs x86_64 32:9.9.4-61.el7 c7-media 1.0 M

Transaction Summary
==========================================================================================
Install 1 Package (+1 Dependent package)

Total download size: 1.2 M
Installed size: 3.0 M
Is this ok [y/d/N]: y
Downloading packages:
------------------------------------------------------------------------------------------
Total 18 MB/s | 1.2 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 32:bind-libs-9.9.4-61.el7.x86_64 1/2
Installing : 32:bind-utils-9.9.4-61.el7.x86_64 2/2
Verifying : 32:bind-utils-9.9.4-61.el7.x86_64 1/2
Verifying : 32:bind-libs-9.9.4-61.el7.x86_64 2/2

Installed:
bind-utils.x86_64 32:9.9.4-61.el7

Dependency Installed:
bind-libs.x86_64 32:9.9.4-61.el7

Complete!

原文地址:https://www.cnblogs.com/sxgaofeng/p/10515277.html