Installing boost on RHEL7/CentOS7

The following is an example of how to to install boost on RHEL7 or CentOS7. The boost version here is 1.68 and the library selection was based on requirements for a Microsoft Casablanca (cpprestsdk) build.

These particular notes assume GCC 7.2 built from source.

mkdir -p ~/src && cd ~/src
tar xf boost_1_68_0.tar.gz
cd boost_1_68_0
./ --libdir=/usr/local/lib64 --with-libraries=system,thread,test,chrono,regex,date_time,filesystem,locale,random,atomic,log,program_options
echo "using gcc : 7.2 : /usr/local/bin/g++ ; " >> tools/build/src/user-config.jam
./b2 -j 8 cxxflags="-Wno-deprecated-declarations -Wno-unused-function" --toolset=gcc-7.2
sudo ./b2 install


Leave a Comment