0atfug
Last Updated: March 07, 2016
·
24.45K
· saeidzebardast
Saeid zebardast

Installing Boost 1.55 from source on Ubuntu 12.04

Get the version of Boost that you require. This is for 1.55 but feel free to change or manually download yourself:

wget -O boost_1_55_0.tar.gz http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/download
tar xzvf boost_1_55_0.tar.gz
cd boost_1_55_0/

Get the required libraries, main ones are icu for boost::regex support:

sudo apt-get update
sudo apt-get install build-essential g++ python-dev autotools-dev libicu-dev build-essential libbz2-dev 

Boost's bootstrap setup:

./bootstrap.sh --prefix=/usr/local

If we want MPI then we need to set the flag in the user-config.jam file:

user_configFile=`find $PWD -name user-config.jam`
echo "using mpi ;" >> $user_configFile

Find the maximum number of physical cores:

n=`cat /proc/cpuinfo | grep "cpu cores" | uniq | awk '{print $NF}'`

Install boost in parallel:

sudo ./b2 --with=all -j $n install 

Assumes you have /usr/local/lib setup already. if not, you can add it to your LD LIBRARY PATH:

sudo sh -c 'echo "/usr/local/lib" >> /etc/ld.so.conf.d/local.conf'

Reset the ldconfig:

sudo ldconfig
Say Thanks
Respond

5 Responses
Add your response

11844
Saeid zebardast
over 1 year ago ·
13495
0 biomhmgwvjzvocazfselhdswcgozekazlooah2puhzoxbh6vidvcmuevj1yii rjqhhkfwm3x8dm

Thanks!

over 1 year ago ·
14308
Rene la taupe 13587 normal

You are a GOD.

over 1 year ago ·
15022
84dc21f3ea806c51050130bed8edb08a

thanks

over 1 year ago ·
18721
Picture0025 normal

thanks

over 1 year ago ·
Filed Under