在 m1 MAC OS 上构建 Bitcoind 时出错

时间:2021-04-04 15:47:29

标签: macos boost bitcoin apple-m1 bitcoind

所以我试图通过遵循为 OS X 构建 bitcoind 的文档在我的 m1 mac 上构建 bitcoind:https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md 并且我每次尝试构建时都遇到相同的错误。以下是我采取的步骤:

<块引用>

brew install autoconf automake berkeley-db4 libtool boost miniupnpc openssl pkg-config protobuf qt5

<块引用>

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

<块引用>

cd 比特币

<块引用>

./autogen.sh

<块引用>

./configure --with-gui=no

配置后,我收到以下消息:

<块引用>

正在检查 boostlib >= 1.58.0 (105800)... 配置:我们无法检测到 boost 库(版本 1.58.0 或更高版本)。如果您有一个暂存的 boost 库(仍未安装),请在您的环境中指定 $BOOST_ROOT 并且不要为 --with-boost 选项提供 PATH。如果您确定安装了 boost,请在 中检查您的版本号。有关更多文档,请参阅 http://randspringer.de/boost

我不明白为什么它没有检测到图书馆...

有人可以帮我吗?

1 个答案:

答案 0 :(得分:1)

我遇到了同样的问题,我是这样解决的:

cd depends/
make
# After completing this step, you will see one new folder (arm-apple-darwin20.4.0) in /bitcoin/depends. The version number may change

# Go back to bitcoin folder
cd ..

# Set up the compilation tool
./configure --with-gui=no --prefix=$PWD/depends/arm-apple-darwin20.4.0
# change the version ...darwin20.x.x with what you have in depends directory

# Start to compile bitcoin
make HOST=arm-apple-darwin20

make check

您可以在 src 目录中看到 bitcoind 二进制文件。享受:)

<块引用>

来源: https://gist.github.com/awesome-doge/9bfbd1d3fd9b725c4df224433fa3596e