Trying to build a project that requires boost. I get the following error:

Unable to find the requested Boost libraries.

  Boost version: 1.58.0

  Boost include path: /usr/include

  Could not find the following Boost libraries:


  Some (but not all) of the required Boost libraries were found.  You may
  need to install these additional Boost libraries.  Alternatively, set
  BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
  to the location of Boost.

If I run

sudo apt-get install libboost-all-dev

I get

libboost-all-dev is already the newest version (

So I don't know what to do here. How can install these particular boost packages, or reinstall the whole boost package?

edit: Also, if I run apt-get remove libboost-all-dev , nothing seems to get removed. Running apt-get install libboost-all-dev afterwards still tells me I have the newest version.

  • 2
    /usr/lib/x86_64-linux-gnu/libboost_{thread,locale}.a are provided by libboost-{thread,locale}1.58-dev which are installed via libboost-all-dev. Maybe you should check if the build system has more detailed logs. – muru Apr 17 '18 at 8:48
  • "Maybe you should check if the build system has more detailed logs" what does that mean? – Jonathan Lindgren Apr 17 '18 at 9:04
  • I don't know which build system this is (CMake?). If you ran ./configure, there will be a config.log. CMake has something like CMakeError.log, I think. The log file will have details on the actual command ran to check this and what errors it got. – muru Apr 17 '18 at 9:06
  • I found the CMakeError.log but I don't know what to do with it. I removed all my boost files, but still apt-get seems to tihnk I have it installed and refused to reinstall boost – Jonathan Lindgren Apr 17 '18 at 9:23
  • 1
    libboost-all-dev is simply a meta-package. It depends on various libboost-*-dev packages which in turn depend on libboost-*X.Y-dev packages to provide the actual libraries. Reinstalling just the libboost-all-dev package is effectively meaningless. – muru Apr 17 '18 at 9:24

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.