Created
August 14, 2018 08:08
-
-
Save naviocean/1b1444a872f2805c6fb9a2bd70ef1af1 to your computer and use it in GitHub Desktop.
Ubuntu upgrade to latest of boost
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.68.0/boost_1_68_0.tar.gz | |
tar -zxvf boost_1_68_0.tar.gz | |
rm -f boost_1_68_0.tar.gz | |
cd boost_1_68_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_68_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