配置比特币核心生成
先安装brew
然后参考该链接安装所需的编译软件:https://segmentfault.com/a/1190000020251151
1 2 3 4 |
brew install autoconf brew install automake brew install Libtool |
这时候报错
1 2 |
Can't exec "glibtoolize": No such file or directory at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/FileUtils.pm line 345, line 4. |
原因是因为glibtoolize的路径没有添加到系统路径中,所以可以参考这里先找到自己的系统路径
https://apple.stackexchange.com/questions/108513/cant-exec-glibtoolize-no-such-file-or-directory
1 2 3 |
PATH=$PATH:/usr/local/Cellar/libtool/2.4.7/bin export PATH |
编译成功
运行./configure生成编译脚本
报错
1 2 |
error: libdb_cxx headers missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality) |
根据这个链接补充了一些基础库:https://blog.csdn.net/weixin_42654444/article/details/84206020?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-1-84206020-blog-118966251.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-1-84206020-blog-118966251.pc_relevant_default&utm_relevant_index=1
1 2 3 4 5 6 |
brew install berkeley-db4 brew install boost brew install openssl brew install libevent brew install pkg-config |
不报上面的错了,但是依旧报错:
1 2 3 |
./configure: line 23846: syntax error near unexpected token `QTPLATFORM,' ./configure: line 23846: ` PKG_CHECK_MODULES(QTPLATFORM, Qt5PlatformSupport, QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS")' |
https://github.com/bitcoin/bitcoin/issues/6406
最后发现是因为用的比特币核心代码的版本不是最新版,回溯换了最新版之后就编译成功了