Yum provides…


Yum, the preferred RPM package manager makes our lives a bunch easier when you need to install new packages.
Below an example of a nice feature that yum “provides”.

[pieter@laptop ~] nslookup www.google.com

bash: nslookup: command not found

[pieter@laptop ~] yum search nslookup
Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit
Loading mirror speeds from cached hostfile
Warning: No matches found for: nslookup
No Matches found

Doooooh!! Now what?

In Yum’s man page (man yum) we find our rescue:

provides or whatprovides

Is used to find out which package provides some feature or file. Just use a specific name or a file-glob-syntax wildcards to list the pack‐
ages available or installed that provide that feature or file.

[pieter@laptop ~] yum provides */nslookup

Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit
Loading mirror speeds from cached hostfile

32:bind-utils-9.8.1-2.fc16.x86_64 : Utilities for querying DNS name servers
Repo : fedora
Matched from:
Filename : /usr/bin/nslookup

32:bind-utils-9.8.2-0.2.rc1.fc16.x86_64 : Utilities for querying DNS name servers
Repo : updates
Matched from:
Filename : /usr/bin/nslookup

As we can see from Yum’s output, the package we need to install in order to have nslookup is “bind-utils”

[pieter@laptop ~] yum install -y bind-utils

[..output stripped…]

[pieter@laptop ~] nslookup www.google.com
Server: ******
Address: *****#53

Non-authoritative answer:
www.google.com canonical name = www.l.google.com.
Name: www.l.google.com
Address: 74.125.230.242
Name: www.l.google.com
Address: 74.125.230.243
Name: www.l.google.com
Address: 74.125.230.244
Name: www.l.google.com
Address: 74.125.230.240
Name: www.l.google.com
Address: 74.125.230.241

Huray!

Advertisements

2 thoughts on “Yum provides…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s