我从Github下载了比特币核心,并试图通过Andreas Antonopoulos比特币书籍Mastering Bitcoin第3章(比特币客户端)的说明进行设置
目前停留在配置步骤上,当我运行./configure
时,一切都看起来很好,直到它以下面的错误结束:
...
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for strings.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for MSG_NOSIGNAL... no
checking for Berkeley DB C++ headers... no
configure: error: libdb_cxx headers missing
我正在使用homebrew,如何修复此错误?
答案 0 :(得分: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-only,这意味着它没有符号链接到/usr/local
。您不需要它来链接它来构建比特币,但如果您愿意,请按照以下方式进行:
$ brew --force link berkeley-db4
答案 1 :(得分:1)
brew install berkeley-db4
然后
brew link berkeley-db4 --force
为我工作。不是这里提出的那些
答案 2 :(得分:0)
对于像我一样使用fedora的人
sudo dnf install libdb-cxx-devel
它可能会发出关于不兼容的 libdb 版本的警告,你可以忽略它
./configure --with-incompatible-bdb