https://bitcointalksearch.org/topic/m.10398331
cd ~
wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
tar zxf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix; ../dist/configure – – enable-cxx
make; sudo make install
rm -R ~/db-4.8.30.NC* # delete the sources
# Link the libraries
sudo ln -s /usr/local/BerkeleyDB.4.8/lib/libdb-4.8.so /usr/lib/libdb-4.8.so
sudo ln -s /usr/local/BerkeleyDB.4.8/lib/libdb_cxx-4.8.so /usr/lib/libdb_cxx-4.8.so
#
# (SERVER IS PREPARED. FROM HERE ON YOU CAN INSTALL OTHER WALLETS)
#
# where to find db4.8 tell your system (needs to be redone after reboot)
export BDB_INCLUDE_PATH=”/usr/local/BerkeleyDB.4.8/include”
export BDB_LIB_PATH=”/usr/local/BerkeleyDB.4.8/lib”