apt

Nils Kassube kassube at gmx.net
Tue Sep 14 13:57:06 UTC 2010


Jitender Kiraria wrote:
> what result should the following command display
> " apt-file search X11/Xlib.h "

On my machine this is the output:

ivtools-dev: /usr/include/IV-X11/Xlib.h
libghc6-x11-dev: /usr/lib/haskell-
packages/ghc6/lib/X11-1.5.0.0/ghc-6.12.1/Graphics/X11/Xlib.hi
libhugs-x11-bundled: /usr/lib/hugs/packages/X11/Graphics/X11/Xlib.hs
libroot5.18: /usr/lib/root/5.18/cint/include/X11/Xlib.h
libx11-dev: /usr/include/X11/Xlib.h

> I used it and get no output on screen,,,,,,,,,The prompt just jumped
> on the nextline.

I suppose, your apt-file data base isn't updated. Use the command

sudo apt-file update

and then try again.

> Anyway What is use of   the command   " apt-file search "
> and what is it supposed to display as output in case command is
> successful and in case command fails???????????

From "man apt-file":

| search
|  Search in which package a file is included. A list of all packages
|  containing the pattern pattern is returned. 
| 
|  apt-file will only search for filenames, not directory names. This is
|  due to the format of the Contents files it searches.


If it is successful it displays the package names which include the 
requested file name and the entire path to a file. As you were trying to 
compile a package from source, the missing include files are expected to 
be found in the directory /usr/include/ and that's why I suggested 
libx11-dev and not the other packages mentioned in the output above.


Nils




More information about the ubuntu-users mailing list