Installing bitcoin in ubuntu

Get the source first

git clone
cd bitcoin

You can read doc/, or follow along.

This step should be no problem.


This step may give you some issues…


If you encounter configure: error: libdb_cxx headers missing

sudo apt-get install libdb5.1++-dev

If you encounter configure: error: Found Berkeley DB other than 4.8, required for portable wallets (–with-incompatible-bdb to ignore), run the following command instead. You can always send your bitcoins to another wallet.

./configure --with-incompatible-bdb

If you encounter checking for boostlib >= 1.20.0… configure: We could not detect the boost libraries (version 1.20 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to –with-boost option. If you are sure you have boost installed, then check your version number looking in . See for more documentation.

sudo apt-get install libboost-all-dev

This time you may have a clean run. However, if you scroll up to check the output lines, you may see this line: configure: WARNING: MOC not found; bitcoin-qt frontend will not be built. If you want the frontend, run:

sudo apt-get install libqt4-core libqt4-gui libqt4-dev

Then when you run configure again, you should see checking for moc-qt4… /usr/bin/moc-qt4.

Now, everything is ready.


The compilation took like 5 min.

Then install the compiled binary.

make install

Now just run the following to bring up the bitcoin frontend, yeah~~~


To start mining, go to Help > Debug Window > Console and type in setgenerate true to turn it on. Type setgenerate false to stop. My machine became really hot after a while, probably coz my CPU was struggling with all the complex computations. I read that some people bought a separate GPU card for better performance, something to consider.

It’s worth noting that nowadays it’s very hard to efficiently mine bitcoins alone without dedicated software and hardware. Often miners form a pool (or a group) to speed up the process and share the profit. Read more at:

8 thoughts on “Installing bitcoin in ubuntu

  1. Jim McCafferty says:

    Hi Brian,

    I’ve been trying to optimize a source build for bitcoins – but I keep running into issues with the Berkeley db 4.8 install. I’ve included the –enable-cxx flag on the /dist/configure call, but when I try to configure bitcoin-master I still get the libdb_cxx header error. When I try the sudo apt-get install libdb_cxx command I get no package errors (even suffixing with 4.8).

    I can get it working with the latest version of Berkeley, but then I have to select the incompatible bdb option. I’m using Ubuntu 12.04.3.

    Have you any suggestions?

    Many Thanks


  2. The flag “–with-incompatible-bdb” will give you an incompatible BerkeleyDB, making your wallet unportable to other bitcoin versions. But as long as you are using the same bitcoin versions in different machines, you will be fine.


    Also you can export your wallet with Bitcoin-Qt and import it to other wallets.



  3. Eric Lin says:

    hello brian chan: it although help me compile, but when I execute your last command, bitcoin-qt,
    bitcon-qt: command not found
    mine is 13.10 upgrade to 14.04, linux kernel 3.13.0-24-generic

    at make install stage,
    nothing to be done for ‘install-exec-am’

    is that right? (that looks is something wrong or culprit)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s