Installing boost into /usr/include
Actually, you're missing some steps...
First of all, 1.58 is fine for other software in your version of Ubuntu. Indeed, if you're developing something yourself, then having the latest might be a good idea.
What you downloaded from sourceforge should not be the "boost binary". It should be all source code. The steps you gave would setup the build's configuration files and perform the build, but you then have to install it.
See these instructions http://www.boost.org/doc/libs/1_61_0/more/getting_started/unix-variants.html .
You are missing this instruction:
sudo ./b2 install
Nevertheless, you should read through all of it. You should pay particular attention to the point about "Header only". Only some libraries actually need to be built.
Also, it is not quite correct that you should not put it in /usr/include
. It's fine if you do -- you will just have to be sure to include it in the directory search in your compilation line. Putting it in /usr/include
does make things a lot easier. (--prefix
is a useful option if you don't have sudo
access on the computer)
PS: Remember to set the BOOST_ROOT environment variable!
Related videos on Youtube
Henricus V.
Updated on September 18, 2022Comments
-
Henricus V. over 1 year
I am trying to install boost into the folder
/usr/include
.I tried
sudo apt-get install libboost-dev
, but the highest versionapt-get
provides is 1.58 instead of the newest 1.61.Then I downloaded the boost binary from sourceforge and compiled them with
sudo ./bootstrap.sh sudo ./b2
The library was compiled successfully but no file was written into
/usr/include
. This post suggests that--prefix[directory]
should not be used as the entire library will be installed into[directory]
.I am expecting part of the library to be installed into
/usr/include
and part into/usr/lib
. The documentations should be located inside/usr/share
.