Server Fault is a question and answer site for system and network administrators. 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 have a debian (well technically ubuntu) source package, i.e. the .dsc, the .tar.gz, etc., I want to build this. The dpkg-buildpackage fails, since I don't have all the build dependencies.

Normally I'd use apt-get build-dep, but this package isn't in apt.

Is there a 'clean', 'proper' way to install all the build dependencies, given a source package. I know I could just open the debian/control file, but I'm curious if there's a 'proper' way.

I have installed build-essential, and have all the normal compilers etc., this package requires extra software.

share|improve this question

Use mk-build-deps which is part of devscripts.

share|improve this answer
up vote 5 down vote accepted

Actually I can use dpkg-checkbuilddeps which shows the build dependencies. That gets me 99% of what I need

share|improve this answer
oddly enough, the packagename-version.dsc file contains the build dependencies in the line that begins with the string Build-Depends – quack quixote Mar 30 '10 at 13:46

I usually use debuild from devscripts to build packages, and if relevent it prints a line of the missing build-deps.

The "proper" way is to use pbuilder or similar which will build the package in a minimal chroot, and just install any additional build-deps as specified by the package, this also removes a bunch of other potential issues (local installations of non-packaged libraries for example).

share|improve this answer


apt-get install build-essential
share|improve this answer
I have install build-essential. This package requires extra software. – Rory Mar 30 '10 at 11:15
And it doesn't explain what requires? maybe libncurses-dev also. – Lanselot Mar 30 '10 at 11:33
That's not the point; of course it does. The point is to have a command that actually installs the dependencies, not one that just displays them. – Matthias Urlichs Sep 27 '15 at 17:51

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.