How to find the package to which a certain file belongs in a Debian-based distribution?

444 views Asked by At

Where are the Gnulib files in Linux?

I want use lib like safe-read, mbchar, etc... in my project but I do not find them on my Ubuntu 11.10 machine.

1

There are 1 answers

4
krlmlr On BEST ANSWER

apt-file is your friend:

x@y:~$ apt-file search safe-read
gnulib: /usr/share/gnulib/lib/safe-read.c
gnulib: /usr/share/gnulib/lib/safe-read.h
gnulib: /usr/share/gnulib/m4/safe-read.m4
gnulib: /usr/share/gnulib/modules/safe-read

Use sudo apt-get install gnulib (in this case) to install the missing dependency. Run

sudo apt-get install apt-file
sudo apt-file update

once to initialize the file index.