I keep myself busy compiling (make
ing) several packages and some of them are not in the repositories (so apt-get build-dep
doesn't help), the complete documentation about build dependencies is missing or lacking, or I just don't know what library is lacking. Is there a way that I can just build something and if some header is missing it gets installed?
1 Answer
You are looking for auto-apt
. This tool gets a list of all the files contained in the repositories, along with the packages and installs the dependencies that your programs look for. It's syntax is a mixture of what apt-file offers with the plus that you don't have to figure out the error that make
or configure
shows you, and you don't need to do a search manually. It installation and use is easy.
Prerequisites
You must install it first:
sudo apt-get install auto-apt
and then update the package list (this is recommended at least before you start building something):
sudo auto-apt update
Usage
There are two ways you can use it:
auto-apt run command
it will run the command, if it finds some file that doesn't exist in your box it will ask you to put your sudo password and install it.
sudo auto-apt run
This will drop you in a non-root shell while the auto-apt main program will have root privileges. Any file operation will be performed by your user, so you don't have to fear about using root account.
Other interesting stuff
auto-apt includes a debuild
command that will list you all building dependencies without actually building anything. This is a helper for first time maintainers that wants to compile/maintain their own version of packages not available in the Ubuntu/Debian ecosystem.
-
Sadly, auto-apt is quite dead nowadays. If anyone coming here has a newer solution, that would be greatly appreciated. :/– anonMay 22, 2023 at 8:19