s9pcha
Last Updated: February 25, 2016
·
600
· irakli
Avatar ika

Find Yum Package that Provides Needed Utility

In Yum-powered Linux distributions, such as: RedHat/Fedora or CentOS, one of the most frustrating activities is figuring-out which yum package provides a specific utility we need. Case in point: try finding packages that provide dig or audit2allow.

Easy solution:

sudo yum provides \*/audit2allow

returns output that contains:

policycoreutils-python-2.0.83-19.30.el6.x86_64 : SELinux policy core python utilities
Repo        : base
Matched from:
Filename    : /usr/bin/audit2allow

indicating that we can get our utility by running:

sudo yum install policycoreutils-python

Similary for dig:

sudo yum provides \*/dig

returns a pretty long output, but we can easily find a record that corresponds to /usr/bin/dig and it looks like:

32:bind-utils-9.8.2-0.17.rc1.el6_4.4.x86_64 : Utilities for querying DNS name servers
Repo        : updates
Matched from:
Filename    : /usr/bin/dig

We could of course, shorten the search time by guessing that the dig utility we need will be installed under some path containing "bin" in it, and filtering accordingly:

sudo yum provides \*/dig | grep -i bin
32:bind-utils-9.8.2-0.17.rc1.el6.x86_64 : Utilities for querying DNS name
Filename    : /usr/bin/dig

Either way, it's easy to spot that "dig" is part of "bind-utils" package and can be installed with:

sudo yum install bind-utils
Say Thanks
Respond