Posted by Steve on Wed 18 Jan 2006 at 16:53
There are times when you're looking for a particular library, or file, which you know is available to Debian but you cannot find the package which contains it. This is the kind of job that the Debian packages site helped with in the past, but given its current unavailability we'll look at another approach.
Finding the package which has installed a particular file upon your system is accomplished via the dpkg command. This can be used as follows:
steve@skx2:~$ dpkg --search /etc/bash_completion bash: /etc/bash_completion
Here we've used the --search argument to discover which locally installed package placed the file /etc/bash_completion upon the system - and it showed us that the file belongs to the bash package.
But what if you know you need to find a particular file to finish a compilation? And you don't know which package it is contained in?
The solution to this related problem is to use the apt-file command. This will allow you to search the files which are contained in packages.
Install it with:
apt-get install apt-file
Once installed you'll need to download the actual data which it uses to search. This can be accomplished with the following command:
apt-file update
Once you've downloaded data you can now proceed to searching for packages.
Recently I wanted to compile some software and I didn't know which package contained the header I neede to use (alisp.h). Using apt-file i it was simple to find out:
skx@itchy:~$ apt-file search alisp.h libasound2-dev: usr/include/alsa/alisp.h
That showed me that the package libasound2-dev contains the file alisp.h. Once I'd installed the package I was able to compile the code I'd downloaded.
[ Parent ]
For some reason I always forget about "dpkg -L" and end up reading /var/lib/dpkg/info/packageName.list!
[ Parent ]
Hi
another nice command is auto-apt. For searching files, it's the same thing:
auto-apt update auto-apt search test.hbut it can do even more. If you run it with
auto-apt run ./configurein your standard not-yet-released-in-debian package, then auto-apt will prompt you on every file it knows could be on your computer, if only you'd have that package installed...
Unfortunatly, it doesn't take
deb file://sources from sources.list.
Ineiti
[ Parent ]
[ Parent ]
Using apt-listchanges will show you the changelog of packages you're upgrading.
Failing that you can see the changelogs of packages you have installed in /usr/share/packageName/.
[ Parent ]
apt-listchanges is a great. i use it to keep myself up-to-date about what's happening in debian, particularly on a relatively well-used testing/unstable system.
[ Parent ]
Of course you are correct. I must have typed that too quickly to make such a silly mistake!
[ Parent ]
james@moleman:~$ wajig JIG> help Common JIG commands: update Update the list of down-loadable packages new List packages that became available since last update newupgrades List packages newly available for upgrading install Install (or upgrade) one or more packages or .deb files remove Remove one or more packages (see also purge) toupgrade List packages with newer versions available for upgrading upgrade Upgrade all of the installed packages or just those listed listfiles List the files that are supplied by the named package listnames List all known packages or those containing supplied string whatis For each package named obtain a one line description whichpkg Find the package that supplies the given command or file Run LIST-COMMANDS for a complete list of commands. JIG> whichpkg alsamixer File Path Package ===========================================================-===== ============ /usr/bin/alsamixer alsa-utils /usr/share/doc/alsa-utils/README.alsamixer alsa-utils /usr/share/man/man1/alsamixer.1.gz alsa-utils JIG>
[ Parent ]
[ Parent ]
[ Parent ]
[ Parent ]
[ Parent ]
#debsums -e <packagename>And the one you changed (maybe more interessting)
#debsums -ce <packagename>
[ Parent ]
[ Parent ]