I've read the README on the bitcoin github page which instructs you to install the following libraries using MacPorts - boost db48 dbus openssl.

I have these installed using homebrew which I use instead of MacPorts. They are also the correct versions as homebrew installs, later, incompatible versions.

With these installed I edited the make to point to the libraries homebrew installed namely DEPSDIR=/usr/local and adding -I"$(DEPSDIR)/Cellar/berkeley-db4/4.8.30/include" to INCLUDEPATHS

However I'm getting this compiler error which is cryptic to me:


Has anybody managed to get this working?

2 Answers 2


Update: These instructions or similar are included in the bitcoin source as of 19 February 2013. See doc/build-osx.md for details. As such, the below instructions may fall out of date. Alternatively, make it easy on yourself an use WyseNynja's homebrew tap with brew tap wysenynja/bitcoin && brew install bitcoind.

Building bitcoind on OSX 10.8 with homebrew

I got bitcoind working using these instructions. For reference, I'm on OSX 10.8.2 with homebrew 0.9.3. I've made an assumption throughout that homebrew is installed in /usr/local. I've also assumed that you've installed the Xcode command line utilities and any other packages that are essential to building code. If you build any code regularly, e.g. you have RVM installed to build ruby occasionally, you're probably OK!

Install some necessary libraries from homebrew.

brew install boost miniupnpc openssl

Revert berkeley-db formula to an older version

cd /usr/local
git checkout e6a374d Library/Formula/berkeley-db.rb

You may have to unlink it if you've already installed the latest version.

brew unlink berkeley-db

Install berkeley-db 4.8 now that you've got the right formula in place.

brew install berkeley-db

Checkout from Github.

git clone https://github.com/bitcoin/bitcoin.git

Edit the makefile.osx to change it a bit. Here's a diff that shows what you need to change, or you can just use this as a patch by doing echo '$patch-text' | patch, where $patch-text is the patch text below.

diff --git a/src/makefile.osx b/src/makefile.osx
index 9629545..ffac9a3 100644
--- a/src/makefile.osx
+++ b/src/makefile.osx
@@ -7,17 +7,19 @@
 # Originally by Laszlo Hanyecz ([email protected])


  -I"$(CURDIR)" \
  -I"$(CURDIR)"/obj \
  -I"$(DEPSDIR)/include" \
- -I"$(DEPSDIR)/include/db48"
+ -I"$(DEPSDIR)/include/db48" \
+ -I"/usr/local/Cellar/openssl/1.0.1c/include"

  -L"$(DEPSDIR)/lib" \
- -L"$(DEPSDIR)/lib/db48"
+ -L"$(DEPSDIR)/lib/db48" \
+ -L"/usr/local/Cellar/openssl/1.0.1c/lib"


Start the build.

cd bitcoin/src
make -f makefile.osx DEPSDIR=/usr/local

It's now available at ./bitcoind. We have to first create the rpc configuration file, though. Run ./bitcoind to get the filename where it should be put, or just try the below text.

echo "rpcuser=bitcoinrpc
rpcpassword=HdAseQSRkirfoNuUSzqzixyL9sM1T6ABfzV1nyNmbuwg" > "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
chmod 600 "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"

When next you run it, it will start downloading the blockchain, but it won't output anything while it's doing this. This process may take several hours.

Mine appears to be working fine, but it's still downloading the blockchain. I'll be able to tell after some testing if it's working normally or not, but I suspect that it is!


  • brew install berkeley-db is throwing Error: No available formula for berkeley-db Commented Jan 23, 2014 at 10:05
  • It works with formula in HEAD. Perhaps the commit hash is wrong? Commented Jan 23, 2014 at 10:06
  • 2
    You'll want to use the berkeley-db4 formula now from homebrew-versions. That commit hash was for when the berkeley-db formula didn't have separate branches.
    – Colin Dean
    Commented Jan 24, 2014 at 14:03

The other answer here probably works, but has way too many steps for my taste.

npm install bitcore-node -g

Even though you're installing bitcore-node, it includes the bitcoind dependency which you can use by itself or with bitcore to add services on top of bitcoind

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.