Search the package

Another short note in the series "useful package-manager commands" 😉 .

Every serious user of Linux has experienced the problem of a missing shared library when compiling the sources of a third-party program. Now, you may know that you'd need lib64xyz.so.n for a successful compilation, but you may not know which (not installed!) package actually contains this particular library.

I know only two package managers which would deliver this information in a straightforward way:

Mandriva:

urpmf <exact_filename>

Debian:

wajig whichpkg <exact_filename>

(this one needs lynx and fping)

In Archlinux, pacman -Qo only searches local packages, as does OpenSuse's pin. 😞

Update 2019-04-24: All major distributions have learned how to do that now. See my corresponding post from today.