Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nivertech/778347fa47aee459ed9c to your computer and use it in GitHub Desktop.
Save nivertech/778347fa47aee459ed9c to your computer and use it in GitHub Desktop.
Compile Bitcoin on Ubunutu 12.04 LTS

Instructions for Ubuntu 12.04 LTS:

For QT see: http://b.agilob.net/compile-bitcoin-qt-from-sources/

Preparation

sudo apt-get update
sudo apt-get upgrade

sudo apt-get install build-essential libtool autotools-dev autoconf autogen gcc g++ pkg-config libssl-dev openssl
sudo apt-get install libdb++-dev libboost-all-dev
sudo apt-get install libqt5gui5 libqt5core5 libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
sudo apt-get install libqrencode-dev
sudo apt-get install libminiupnpc-dev

# for QT
sudo apt-get install -y qt4-qmake libqt4-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev 

Download bitcoin source code

mkdir -p ~/ws
cd ~/ws
git clone https://github.com/bitcoin/bitcoin.git

Download and compile Berkley DB 4.8

cd ~/ws
mkdir bitcoin/db4/

wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
tar -xzvf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix/
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$HOME/ws/bitcoin/db4/
make install

Compile Bitcoin with Berkley DB 4.8

cd ~/bitcoin/
./autogen.sh
./configure --with-gui --with-incompatible-bdb
#./configure --with-gui LDFLAGS="-L$HOME/ws/bitcoin/db4/lib/" CPPFLAGS="-I$HOME/ws/bitcoin/db4/include/"
#./configure -without-qt --with-incompatible-bdb
#./configure LDFLAGS="-L$HOME/ws/bitcoin/db4/lib/" CPPFLAGS="-I$HOME/ws/bitcoin/db4/include/"
make -s -j5

Run Bitcoin Daemon/QT/Client

./src/bitcoind
./src/bitcoin-cli

./src/qt/bitcoin-qt

Please share your experience and provide constructive feedback!

Thanks, --- Kosta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment