编译比特币核心代码时运行./configure时无法检测到boost库

问题描述 投票:0回答:2

这是我得到的错误:

checking for boostlib >= 1.58.0 (105800)... configure: 
We could not detect the boost libraries (version 1.58.0 or higher). 
If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option.  
If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
configure: error: Boost is not available!

我使用的是最新版本的 macOS big sur,并且使用自制软件安装了 boost。我相信boost应该安装在usr/local/include中,但对我来说,它安装在/opt/homebrew/opt/boost中。这可能是问题所在吗?我使用符号链接从 usr/local/include 到 /opt/homebrew/opt/boost 但当我进入比特币文件夹然后运行 ./configure 时它不起作用。

boost bitcoin
2个回答
1
投票
    export BOOST_ROOT=/opt/homebrew/opt/boost
    ./configure --with-gui=no --without-bdb --with-boost=$BOOST_ROOT

您的选择可能会有所不同


0
投票

也许为时已晚,但是...对于那些拥有 ARM 架构(或 Apple 芯片)MacBook 的人来说。

  1. 首先你应该使用 Homebrew 安装 boost 库 -
    brew install boost
  2. 然后让我们找到已安装库的路径。输入
    brew info boost
  3. 您可以看到类似以下内容:
    /opt/homebrew/Cellar/boost/1.84.0
  4. 使用参数运行配置脚本:

./configure --with-boost="/opt/homebrew/Cellar/boost/1.84.0"

  1. 利润!
© www.soinside.com 2019 - 2024. All rights reserved.