0

我正在安装内部软件。当我使用时,cmake我收到以下错误:

CMake Error at /usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake:120 (find_package):
  Could not find a package configuration file provided by "boost_random"
  (requested version 1.72.0) with any of the following names:

    boost_randomConfig.cmake
    boost_random-config.cmake

  Add the installation prefix of "boost_random" to CMAKE_PREFIX_PATH or set
  "boost_random_DIR" to a directory containing one of the above files.  If
  "boost_random" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  /usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake:185 (boost_find_component)
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:242 (find_package)
  CMakeLists.txt:275 (FIND_PACKAGE)

所以我检查了各自的目录,所需的文件不在那里。我安装 Boost 已经有一段时间了,但我记得构建它。

在安装内部软件之前,我安装了依赖项,其中包括sudo apt-get install libboost-all-dev.

我尝试通过执行强制cmake查找通过 pkg-manager 安装的版本

cmake -DBOOST_INCLUDEDIR=/usr/include -DBOOST_LIBRARYDIR=/usr/lib/x86_64-linux-gnu

但我仍然遇到同样的错误。

我要么想要uninstall Boost v1.72.0要么获取boost_randomConfig.cmake boost_random-config.cmake文件。

谢谢您的帮助。

4

0 回答 0