Unable to locate package libdb
Sorry for the late reply guys... yeah well that happens when I don't take note of every step (or don't have it in my bash history).

I understand not everyone can be a "penguine" and even I am faaar from an expert. But everyone should! *cough*snowden*cough*

Anyhow... yeah the errors should have been the result of a wrong package name.
Try:
sudo apt-get install libdb++-dev libssl-dev build-essential autoconf automake make nano
IIRC (there it is again) the C++ libs of BerkeleyDB should suffice. If you still get libdb errors try:
sudo apt-get install libdb-dev libdb++-dev libssl-dev build-essential autoconf automake make nano
The other compile errors should be a result from apt-get bailing out because of the missing package.