Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 keep myself busy compiling (makeing) 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?

share|improve this question
up vote 1 down vote accepted

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.


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


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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.