Example: You want to compile a software, lets say CouchDB 1.0. But ./configure list a lot of missing other software and/or libraries.
If there is an older version of the same software, lets say CouchDB 0.8, then try to install and compile the old package. You will get an error message what packages are missing. Then, you can install than with apt-get.
apt-get -b source couchdbapt-get -b tries to compile the source, but in case of missing dependencies you get an error like this: dpkg-checkbuilddeps: Unmet build dependencies: libsctp-dev dpkg-buildpackage: warning: Build dependencies/conflicts unsatisfied; aborting.
apt-get install libsctp-dev