Created
November 27, 2013 20:24
-
-
Save janisz/7682585 to your computer and use it in GitHub Desktop.
Boost instalation script. Sometimes not working
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Update repositories list | |
sudo apt-get update | |
#Completely remove boost | |
sudo apt-get -y --purge remove libboost-all-dev libboost-doc libboost-dev | |
sudo rm -f /usr/lib/libboost_* | |
#Install required packages | |
sudo apt-get -y install build-essential g++ python-dev autotools-dev libicu-dev libbz2-dev | |
#Download boost | |
cd /tmp | |
wget http://downloads.sourceforge.net/project/boost/boost/1.54.0/boost_1_54_0.tar.gz | |
tar -zxvf boost_1_54_0.tar.gz | |
rm -f boost_1_54_0.tar.gz | |
cd boost_1_54_0 | |
#Compile and install | |
./bootstrap.sh --prefix=/usr/local | |
cpuCores=`cat /proc/cpuinfo | grep "cpu cores" | uniq | awk '{print $NF}'` | |
echo "Available CPU cores: "$cpuCores | |
sudo ./b2 --with=all -j $cpuCores install | |
cd .. | |
rm -rf boost_1_54_0 | |
#Install boost-thread-pool | |
git clone https://github.com/AlexMarlo/boost-threadpool.git --depth 1 | |
sudo mv boost-threadpool/boost/threadpool /usr/local/include/boost/ | |
sudo mv boost-threadpool/boost/threadpool.hpp /usr/local/include/boost/ | |
rm -rf boost-threadpool |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment