How to build Bitcoin from source on Ubuntu 11.04 Natty Narwhal?


We have this detailed tutorial for Lucid Lynx, but somehow it doesn't work for Natty.

We also have a similar question but it is too broad and the solution there isn't complete enough to work.

I created this question asking for a tutorial that will work on any freshly installed Natty.

Jader Dias

Posted 2011-09-03T18:41:47.440

Reputation: 487

2Do you know what goes wrong? – David Schwartz – 2011-09-03T23:17:00.650

@David I posted as a comment on the tutorial for Lucid Lynx – Jader Dias – 2011-09-04T01:46:44.003



Wolciph over on the Bitcoin forums wrote a bash script specifically for 11.04. You haven't posted your specific build errors, but I'm guessing that the problem is with the wxWidgets lib and you'll probably have less issues when the main Bitcoin client eventually moves over to Qt (which I believe is in the works, correct me if I'm wrong). In case the link to the script eventually goes down, here it is:

echo "DISCLAIMER: you are using this script at your own discretion! By typing 'c', you agree that you have read the script yourself and have understood it and that you will thus take full responsabilty in the eventuality that this script leads to any harm to you or your property. If you do not agree type 'n'"
read -n 1 r
[ "$r" = 'c' ] || exit 0

set -e

echo "You will be prompted to enter your password in order to install necessary dependencies."

sudo apt-get install build-essential libgtk2.0-dev libssl-dev libdb4.7-dev libdb4.7++-dev libboost-all-dev
sudo apt-get build-dep libwxgtk2.8-dev

mkdir bitcoin || true
cd bitcoin

[ -e wxWidgets.tar.gz ] || wget ""
[ -e wxWidgets ] || tar -xvzf wxWidgets.tar.gz
cd wxWidgets
make -j3
sudo make install
sudo ldconfig
cd ..

[ -e miniupnpc*.tar.gz ] || wget ""
[ -e miniupnpc*/ ] || tar -xvzf *miniupnpc*.tar.gz
cd *miniupnpc*/
sudo make install
cd ..

#for some reason, github's certificate doesn't work:
[ -e bitcoin*.tar.gz ] || wget --no-check-certificate ""
[ -e bitcoin*/ ] || tar -xvzf "v0.3.21"
cd bitcoin*/
make -f makefile.unix
strip bitcoin
echo "Bitcoin is now compiled : '$PWD/bitcoin'"
echo "Launch bitcoin now? (y/n)"
read -n1 r
[[ "$r" = y ]] && ./bitcoin
cd ..

David Perry

Posted 2011-09-03T18:41:47.440

Reputation: 14 120