0

I am installing an inhouse software. When I use cmake I get the following error:

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)

So I checked the respective directories and the required files were not there. its been some time I installed Boost, but I remember building it.

Before the installation of the in-house software I installed dependencies, which included sudo apt-get install libboost-all-dev.

I tried forcing cmake to find the version installed through pkg-manager, by doing

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

But I am still getting the same error.

I either want to uninstall Boost v1.72.0 or get boost_randomConfig.cmake boost_random-config.cmake files.

Thank you for your help.

Alpha001
  • 21
  • 4
  • You may need to add `set(Boost_NO_BOOST_CMAKE ON)` to your CMakeLists.txt, delete the CMakeCache.txt and rerun CMake. – vre Apr 23 '20 at 10:41
  • It looks like CMake found the correct Boost version, but you're missing Boost.Random. Can you install this? `apt-get install libboost-random1.72.0 libboost-random1.72-dev` – Kevin Apr 23 '20 at 11:07

0 Answers0