I'd like to compile Nginx 1.9.8 from source and install it on a Ubuntu 14.04 server. However, and this goes for any software, how do I figure out which dependencies I need to install on my local system in order to build the software?
Say I'd like to compile Nginx. I can always do aptitude show nginx
to get dependencies for the current package available through a repository. On the other hand, this may not be a correct list as the repository may offer an old version where dependencies are different from the new version I'd like to compile.
In general, how do I collect the list of dependencies I need to have installed on a system for a given piece of software?
Given that the dependencies may differ based on the compilation options I provide, is this a matter of "trial and error". That is, should I attempt to compile, then wait for the first error, see what it complains about, add that dependency, and do the same iteration again?