Chris Stewart Chris Stewart - 1 year ago 288
C++ Question

Installing Boost 1.59.0 Ubuntu

I'm trying to install Boost 1.59.0 on Ubuntu, I cannot install it from

because that contains an older version.

I'm cloning the
repo and I'm trying to build it with the following command:

$./ --prefix=/usr/local
$./b2 headers

Finally I'm trying to confirm that that boost was installed with this simple c file

#include <boost/version.hpp>
#include <iostream>
#include <iomanip>

int main()
std::cout << "Boost version: "
<< BOOST_VERSION / 100000
<< "."
<< BOOST_VERSION / 100 % 1000
<< "."
<< std::endl;
return 0;

However when I try to compile it I get the following error:

$ g++ boost_version.c
boost_version.c:1:29: fatal error: boost/version.hpp: No such file or directory
compilation terminated.

and I'm not sure where I am going wrong. I've looked at the other questions and it doesn't seem to resolve my problems.

Answer Source

Reading is hard, I was running


instead of

./b2 install
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download