Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Boost Installation

Tags:

I have a question regarding the installation of the boost libraries. Is there a package that I can use the sudo apt-get install to install this package. I searched all of the questions in this forum and using the commands sudo apt-get install libboost1.40-dev I cannot install theh package with this. Also, I can download it from boost.org but I do not know the correct path to install it too. I would prefer to install it using the sudo apt-get install commands if possible. I am using Ubuntu 9.04. Thanks.

like image 582
tpar44 Avatar asked Apr 22 '11 19:04

tpar44


People also ask

Where should Boost be installed?

Install Boost (Windows) Download the source code from http://www.boost.org/users/download/. Extract in a Boost folder located at C:\ or C:\Program files so that CMake find-modules can detect it. Invoke the command line and navigate to the extracted folder (e.g. cd C:\Boost\boost_1_63_0 ).

How do I install Boost from source?

Build boost from sourceDownload and extract Boost into any directory. Switch to that directory. Prepare the installation, selecting only the libraries that need to be built (this does not affect the header-only libraries). Select a prefix to install Boost to.

What is Boost Linux?

Boost is a set of libraries for the C++ programming language that provides support for tasks and structures such as linear algebra, pseudorandom number generation, multithreading, image processing, regular expressions, and unit testing. It contains 164 individual libraries (as of version 1.76).


2 Answers

If you want to run with the latest version, you can do the bjam install as mentioned by Ralf, but I suggest you build a 'pseudo' package so you can

  • uninstall it safely
  • prevent/notice conflicts with official/existing boost packages.

Here is how to do that:

mkdir -pv /tmp/boostinst cd /tmp/boostinst/ wget -c 'http://sourceforge.net/projects/boost/files/boost/1.66.0/boost_1_66_0.tar.bz2/download' tar xf download cd boost_1_66_0/ ./bootstrap.sh --help ./bootstrap.sh --show-libraries ./bootstrap.sh   checkinstall ./b2 install 
like image 60
sehe Avatar answered Oct 15 '22 08:10

sehe


On new boost version there is other way:

sudo apt-get update wget -c 'http://sourceforge.net/projects/boost/files/boost/1.50.0/boost_1_50_0.tar.bz2/download' tar xf download cd boost_1_50_0 ./bootstrap.sh ./b2 install 
like image 38
MicWide Avatar answered Oct 15 '22 07:10

MicWide