Skip to content

Instantly share code, notes, and snippets.

@yubrew
Forked from BlinkyStitt/making bitcoind
Created May 13, 2013 21:00
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yubrew/5571485 to your computer and use it in GitHub Desktop.
Save yubrew/5571485 to your computer and use it in GitHub Desktop.
sudo apt-get update
sudo apt-get install -y git-core build-essential libssl-dev libboost-all-dev libdb5.1-dev libdb5.1++-dev libgtk2.0-dev
git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin/src
make -f makefile.unix clean; make -f makefile.unix USE_UPNP= bitcoind
# from #bitcoin-dev:
# sacarlson: USE_UPNP= : don't build upnp, USE_UPNP=0 : build but disable by default, USE_UPNP=1 : build but enable by default
# optionally,
strip bitcoind
@judahmu
Copy link

judahmu commented Aug 28, 2013

Great guide! Only thing is if you want to build with USE_UPNP=0 or =1, you might need to first:

sudo apt-get install libminiupnpc-dev

@LTGIV
Copy link

LTGIV commented Dec 8, 2013

Hi yubrew,

I found your solution after seeing your response at http://rdmsnippets.com/2013/03/12/installind-bitcoind-on-ubuntu-12-4-lts/ and purged bitcoind in apt-get as well as dependencies it installed, then dropped the PPA, but salvaged ~/.bitcoin since I had already caught up on the blockchain to 200,000+ entries with 73,000+ to go (https://blockexplorer.com/q/getblockcount)

Ran into a few problems, starting with the latest clone doesn't have these as options in bitcoin/src, so you would need to use:

cd bitcoin
./autogen.sh
./configure

Then ran into problems with Berkeley DB (I'm using Ubuntu 12.04 LTS) as it was screaming "configure: error: libdb_cxx headers missing" when I had installed libdb4.8-dev and got rid of the Berkeley DB 5.1 installs. UGH.

So, to solve that, I went back to "apt-get install libdb++-dev" which brings out 5.1 again, chunks 4.8-dev install, and then gets to "Found Berkeley DB other than 4.8, required for portable wallets" so I had to run configure with "--with-incompatible-bdb" and FINALLY everything worked, and I was able to make and then pluck the binaries out of bitcoin/src.

Upon executing and continuing to watch my block count rise with /usr/bin/watch, I noticed the error of "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"

In essence, to update your instructions a little:


sudo apt-get update
sudo apt-get install -y git-core build-essential libssl-dev libboost-all-dev libdb5.1-dev libdb5.1++-dev libgtk2.0-dev
git clone https://github.com/bitcoin/bitcoin.git

cd bitcoin
(Find the stable release of Bitcoin at https://github.com/bitcoin/bitcoin/tags)
git checkout vX (where as presently, v0.8.5 from 2013-09-11 is stable release, so "git checkout v0.8.5")

cd bitcoin/src
make -f makefile.unix clean; make -f makefile.unix USE_UPNP= bitcoind

(Voila, now you have bitcoin/src/bitcoind compiled and ready to use)

If you want to watch bitcoind update on blockchain, you can use:

watch -n 1 'date; echo; ~/bin/bitcoind getinfo; echo; date'

-LTGIV

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