Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm tired of looking for specific files for specific problems, for questions like this one for example.

Now, is there a way for someone to find out by himself what library one should install to have some file?


  • you have the name of the file you want to make available
  • you don't know the name of the library
  • the library is (of course) not installed on your system
share|improve this question

migrated from Aug 7 '11 at 3:47

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

On Debian or Ubuntu, you can ask your package manager about installed packages

dpkg --search <filename>

If the package isn't installed, you can use apt-file

apt-file update
apt-file search <filename>

If you don't know anything about the specific file you're looking for, but you want to know about some specific functionalty (mentioned in the package description)

apt-cache search <keywords>

To search for a package when you know part of the name (even if the package is not installed)

dpkg -l '*pattern*'
share|improve this answer
Dear Ken, this sounds promising. Maybe I'm doing something wrong, because the search apt-file search ncurses shows me 1489 files. I think I need to gather the correct file from the set manually, no? Thanks. – Dr Beco Aug 7 '11 at 3:51
@Dr Beco: I think for that, you want dpkg -l '*ncurses*' (which I just added to the answer). – Ken Bloom Aug 7 '11 at 4:05
Thanks. Very detailed and helpful. If I could, I would +1 it more than once. ;) – Dr Beco Aug 7 '11 at 4:09

Query your package manager.

yum whatprovides '*/somefile'
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .