1

Im following the guide here (https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md) to install Bitcoin on my Mac. I want to be able to run bitcoind with and without the GUI.

The first time I went though this guide, I DIDNT install berkeley-db@4, and used the configuration:

./autogen.sh
./configure --without-bdb --with-gui=yes

However, when i run make and then ./src/bitcoind it fails and I get the message:

2022-11-27T16:20:32Z Bitcoin Core version v24.99.0-9c47eb450346 (release build)
2022-11-27T16:20:32Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
2022-11-27T16:20:32Z Using RdSeed as an additional entropy source
2022-11-27T16:20:32Z Using RdRand as an additional entropy source
2022-11-27T16:20:32Z Default data directory /Users/me/Library/Application Support/Bitcoin
2022-11-27T16:20:32Z Using data directory /Users/me/Library/Application Support/Bitcoin
2022-11-27T16:20:32Z Config file: /Users/me/Library/Application Support/Bitcoin/bitcoin.conf (not found, skipping)
2022-11-27T16:20:32Z Setting file arg: prune = "1907"
2022-11-27T16:20:32Z Setting file arg: wallet = ["My Bitcoin Core Wallet"]
2022-11-27T16:20:32Z Using at most 125 automatic connections (285 file descriptors available)
2022-11-27T16:20:32Z Using 16 MiB out of 16 MiB requested for signature cache, able to store 524288 elements
2022-11-27T16:20:32Z Using 16 MiB out of 16 MiB requested for script execution cache, able to store 524288 elements
2022-11-27T16:20:32Z Script verification uses 11 additional threads
2022-11-27T16:20:32Z scheduler thread start
2022-11-27T16:20:32Z Binding RPC on address ::1 port 8332
2022-11-27T16:20:32Z Binding RPC on address 127.0.0.1 port 8332
2022-11-27T16:20:32Z [http] creating work queue of depth 16
2022-11-27T16:20:32Z Using random cookie authentication.
2022-11-27T16:20:32Z Generated RPC authentication cookie /Users/me/Library/Application Support/Bitcoin/.cookie
2022-11-27T16:20:32Z [http] starting 4 worker threads
2022-11-27T16:20:32Z Using wallet directory /Users/me/Library/Application Support/Bitcoin/wallets
2022-11-27T16:20:32Z init message: Verifying wallet(s)…
2022-11-27T16:20:32Z Error: Failed to open database path '/Users/me/Library/Application Support/Bitcoin/wallets/My Bitcoin Core Wallet'. Build does not support Berkeley DB database format.
Error: Failed to open database path '/Users/me/Library/Application Support/Bitcoin/wallets/My Bitcoin Core Wallet'. Build does not support Berkeley DB database format.
2022-11-27T16:20:32Z Shutdown: In progress...
2022-11-27T16:20:32Z scheduler thread exit
2022-11-27T16:20:32Z Shutdown: done

The error being Error: Failed to open database path '/Users/me/Library/Application Support/Bitcoin/wallets/My Bitcoin Core Wallet'. Build does not support Berkeley DB database format

So I went back and installed berkley with brew install berkeley-db@4. Then I again ran:

./autogen.sh
./configure --without-bdb --with-gui=yes

and then:

make

But when I run ./src/bitcoind I STILL get the same error above. What am I doing wrong?

2
  • Did you set up "My Bitcoin Core Wallet" as a BerkeleyDB wallet a while ago and now your Bitcoin Core is trying to access that BerkeleyDB wallet but BerkeleyDB isn't configured? Try installing without the --without-bdb flag? Nov 27, 2022 at 16:36
  • 1
    Turns out thats exactly what happened, leaving out --without-bdb fixed it. Thanks!
    – Mark
    Nov 28, 2022 at 9:56

1 Answer 1

0

This was resolved by installing Bitcoin Core without the --without-bdb flag. The Bitcoin Core wallet used BerkeleyDB in the past (if you set up a wallet today it will use SQLite by default) so if you set up a Bitcoin Core wallet in the past then Bitcoin Core will try to access that wallet but it can't if BerkeleyDB wasn't configured.

To avoid this problem in future you can migrate BerkeleyDB, non-descriptor Bitcoin Core wallets to SQLite, descriptor Bitcoin Core wallets using the migratewallet RPC.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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