首页 > 解决方案 > BOOST_BUILD_PATH 目录

问题描述

我打算使用 owlcpp ( owl-cpp ) 并且在安装过程中我需要安装 Boost。我正在开发 ubuntu 18.04 的版本。

当我尝试运行示例进行测试时:

b2 release

我有这个错误:

   'boost-build /usr/include/boost ;'

but we were unable to find "bootstrap.jam" in the specified directory
or in BOOST_BUILD_PATH (searching /usr/include/boost, /usr/share/boost-build).

当我安装或 Boost 生成的头文件在 /usr/local/lib/boost/include 中,而二进制库文件在 /usr/local/lib/boost/lib

我检查了安装,一切都很好。

标签: c++boost

解决方案


当您将 boost 下载到本地目录(例如 /usr/local/boost_1_76_0)时,您会找到这些 jam 文件,包括。boost-build.jam)。

您可以使用 bootstrap.sh 从此处构建;然后您可以运行 b2 install 将二进制文件安装到它们通常的位置。

你也可以在你的 .bashrc 或 .profile 文件中自己设置一个环境变量(使用建议的名称 BOOST_BUILD_PATH)指向 /usr/local/boost_1_76_0/tools/build。)


推荐阅读