我正在关注 Andreas Antonopoulos 的比特币书籍掌握比特币 第三章(比特币客户端)
我在 Mac 上使用 homebrew 来安装依赖项:
brew install autoconf automake libtool boost miniupnpc openssl pkg-config protobuf qt
下一步是./autogen.sh
创建一些配置脚本
现在卡在配置脚本步骤。运行后./configure
,一切看起来都很好,直到最后一行:
configure: error: libdb_cxx headers missing
如何安装 libdb_cxx 标头?
答案1
啊,明白了,我还没有完全读完 build-osx.md 文件中的所有说明
#### Installing berkeley-db4 using Homebrew
The homebrew package for berkeley-db4 has been broken for some time. It will install without Java though.
Running this command takes you into brew's interactive mode, which allows you to configure, make, and install by hand:
```
$ brew install https://raw.github.com/mxcl/homebrew/master/Library/Formula/berkeley-db4.rb -–without-java
```
These rest of these commands are run inside brew interactive mode:
```
/private/tmp/berkeley-db4-UGpd0O/db-4.8.30 $ cd ..
/private/tmp/berkeley-db4-UGpd0O $ db-4.8.30/dist/configure -- prefix=/usr/local/Cellar/berkeley-db4/4.8.30 --mandir=/usr/local/Cellar/berkeley-db4/4.8.30/share/man --enable-cxx
/private/tmp/berkeley-db4-UGpd0O $ make
/private/tmp/berkeley-db4-UGpd0O $ make install
/private/tmp/berkeley-db4-UGpd0O $ exit
```
退出后,你会收到一条警告,提示安装仅用于 keg,这意味着它没有符号链接到/usr/local
。你不需要它来链接它来构建比特币,但如果你想要,请按照以下步骤操作:
$ brew --force link berkeley-db4