I want to use this guide to set up a headless bitcoin core full node and came across the line:

./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib" --disable-wallet

Unfortunately, the blog does not explain why he uses this.

First of all, I want to use my node with wallet. Second, I want to configure it to be usefull with a Raspberry Pi which has only 1GB of RAM and is also running other stuff, for example my Logitech Media Server for audio streaming. So I would like to make the node as lean as possible.

I know that I can use a config file for running bitcoind with entries for upload limit and other setups. Do I need to run the skript also with options or are both setups interchangeably?

Also, I get the error Found Berkeley DB other than 4.8 upon configure. Can Ihave a wallet with the BDB other than 4.8? The error message suggests, that 4.8 is needed for "portable wallets".

Here I found out about dependencies for the wallet and also about the option to built without GUI. Unfortunately, I cannot successfully ./configure with those neither, because BDB 4.8 is also not found this way.

However, to do it without GUI the option --without-guican be used, which is very usefull.

EDIT: I encountered another problem while make:

/usr/bin/ld: cannot find -ldb_cxx-4.8
collect2: error: ld returned 1 exit status
Makefile:4779: die Regel für Ziel „bitcoind“ scheiterte
make[2]: *** [bitcoind] Fehler 1
make[2]: Verzeichnis „/home/pi/Downloads/bin/bitcoin/src“ wird verlassen
Makefile:12975: die Regel für Ziel „all-recursive“ scheiterte
make[1]: *** [all-recursive] Fehler 1
make[1]: Verzeichnis „/home/pi/Downloads/bin/bitcoin/src“ wird verlassen
Makefile:776: die Regel für Ziel „all-recursive“ scheiterte
make: *** [all-recursive] Fehler 1
19:07:10 [pi@raspberrypi bitcoin]$ /usr/bin/ld: cannot find -ldb_cxx-4.8
-bash: /usr/bin/ld:: Datei oder Verzeichnis nicht gefunden

Here I found an answer to a related error and I used ld -ldb_cxx-4.8 --verbose and got this:

attempt to open //usr/local/lib/arm-linux-gnueabihf/libdb_cxx-4.8.so failed
attempt to open //usr/local/lib/arm-linux-gnueabihf/libdb_cxx-4.8.a failed
attempt to open //lib/arm-linux-gnueabihf/libdb_cxx-4.8.so failed
attempt to open //lib/arm-linux-gnueabihf/libdb_cxx-4.8.a failed
attempt to open //usr/lib/arm-linux-gnueabihf/libdb_cxx-4.8.so failed
attempt to open //usr/lib/arm-linux-gnueabihf/libdb_cxx-4.8.a failed
attempt to open //usr/local/lib/libdb_cxx-4.8.so failed
attempt to open //usr/local/lib/libdb_cxx-4.8.a failed
attempt to open //lib/libdb_cxx-4.8.so failed
attempt to open //lib/libdb_cxx-4.8.a failed
attempt to open //usr/lib/libdb_cxx-4.8.so failed
attempt to open //usr/lib/libdb_cxx-4.8.a failed
attempt to open //usr/arm-linux-gnueabihf/lib/libdb_cxx-4.8.so failed
attempt to open //usr/arm-linux-gnueabihf/lib/libdb_cxx-4.8.a failed
ld: cannot find -ldb_cxx-4.8

Now trying with sudo apt-get install gcc-4.8 g++-4.8. That did not help.

Maybe I have to try this guide: https://medium.com/@meeDamian/bitcoin-full-node-on-rbp3-revised-88bb7c8ef1d1

  • I want to add that with wallet it is necessary to sudo apt-get install libdb++-dev. – Ben May 23 at 14:46
  • 1
    You might find this helpful github.com/bitcoin/bitcoin/blob/master/doc/… – JBaczuk May 23 at 15:26
  • Yes, I found it, but unfortunately, it sais nothing about how to compile a debian version that includes BDB 4.8. It just sais: "Ubuntu and Debian have their own libdb-dev and libdb++-dev packages, but these will install BerkeleyDB 5.1 or later." – Ben May 23 at 19:52
  • 1
    Have you tried github.com/bitcoin/bitcoin/blob/master/doc/… – JBaczuk May 23 at 20:33
  • As configure worked, make now takes quite a while at CXX libbitcoin_server_a-init.o. Not sure if the process crashed or if it is just hard work for a small CPU. – Ben May 24 at 4:01

You can follow the instructions for Debian at the build docs:


For Berkely DB, specifically:

Berkeley DB

It is recommended to use Berkeley DB 4.8. If you have to build it yourself,

you can use the installation script included in contrib/

like so:

./contrib/install_db4.sh `pwd`

from the root of the repository.

Note: You only need Berkeley DB if the wallet is enabled (see Disable-wallet mode).

  • 1
    To be able to make with just 1GB I needed to use a 4GB swap: fallocate -l 4G /swapfile && chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile && swapon --show (github.com/bitcoin/bitcoin/issues/11820) – Ben May 24 at 15:31

Following parts of this guide I was able to install a full node with wallet (without GUI) on my already running Raspberry Pi. I did not use all of the steps.

I did use my external hdd as swap:

sudo swapoff --all
sudo nano /etc/dphys-swapfile

Putting in the following


But I had to add this (as root) to make configuring work:

fallocate -l 4G /swapfile && chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile && swapon --show

(It is also possible that the guide just missed the swapon --all after configuring /etc/dphys-swapfile.)

I installed dependencies according to the guide:

sudo apt install git build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libminiupnpc-dev libzmq3-dev jq

But I have to say that I already installed a lot and probably more dependencies from the bitcoin github site.

I did ./contrib/install_db4.sh $(pwd) to install Berkeley DB 4.8.

I used the git I already cloned (in /home/Downloads/bin/bitcoin).

This was something I missed during the first attemps: ./autogen.sh.

Then I export BDB_PREFIX=$(pwd)/db4 (I am actually not sure if I did this first part which is included in the guide and is setting a variable which is used in the ./configure if I understand correctly.) But I definitely did

./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768" --enable-cxx --without-gui --disable-shared --with-pic --enable-upnp-default

And then of course (which might take a few hours)

sudo make install

This time I had no errors and no hangs while configuring.

I also added the bitcoin user and a firewall as decribed in the guide. In my case I had to open up more ports for the firewall because my Raspberry is running other stuff too (SMB, LMS, minidlna).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.