I already posted this answer, but it's gone for some reason. If some moderator deleted it, then I am ok with it, but shame on them for not informing me. In any case, here is the shell script I run on my computers to get bitcoin up and running:
#!/bin/bash
# Word of caution, I am not an experienced shell programmer. All I can #
# guarantee is that this script has worked for me, and that it has #
# done so on multiple Ubuntu machines (one 11.10 and one 13.10), so #
# hopefully it will work for you too #
# Install some packages as instructed on various web sites
sudo apt-get -y install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev
sudo apt-get -y install libtool autotools-dev autoconf
sudo apt-get -y install libdb4.8-dev # Generally this step fails
sudo apt-get -y install libdb4.8++-dev # Generally this step fails
sudo apt-get -y install libboost1.37-dev # Sometimes this step fail
sudo apt-get -y install libboost-all-dev # Sometimes this step fail
sudo apt-get -y install libminiupnpc-dev
sudo apt-get -y install libdb++-dev
sudo apt-get -y install libprotobuf-dev
sudo apt-get -y install libqrencode-dev
# Build berkley db4.8
# Technically, this should only be installed if the above #
# libdb4.8XX-dev packages failed to install but nothing beats a little #
# overkill =) #
cd ~/Downloads
if [ ! -e db-4.8.30 ]
then
wget http://download.oracle.com/berkeley-db/db-4.8.30.tar.gz
tar zxvf db-4.8.30.tar.gz
rm -f db-4.8.30.tar.gz
fi
cd db-4.8.30/build_unix
../dist/configure --prefix=/usr/local --enable-cxx # If this doesn't work, try removing or changing prefix
make
sudo make install
cd ~/Downloads
rm -fr db-4.8.30/
# Build bitcoin
cd ~/Downloads
if [ ! -e bitcoin ]
then
git clone https://github.com/bitcoin/bitcoin ~/Downloads/bitcoin
fi
cd bitcoin
./autogen.sh
./configure # Non Ubuntu 13.xx versions
# ./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu # Ubuntu 13.xx version
make
sudo make install
cd ~/Downloads
rm -fr bitcoin