Installing Boost
Procedure
- Use PuTTY to log in to the server as the root user.
- Run the following command to decompress the Boost installation package:
tar -xvf boost_1_72_0.tar.gz
- Run the following command to go to the directory generated after decompression:
cd boost_1_72_0
- Run the following command to perform the configuration:
./bootstrap.sh --with-toolset=gcc --with-libraries=all --with-python=/usr/bin/python3 --with-python-root=/usr --with-python-version=3.6 --prefix=/path/to/BOOST
- Run the following commands to modify the project-config.jam file:
- Open the project-config.jam file.
vi project-config.jam
- Press i to enter the insert mode and modify the file.
- Change the semicolon (;) in line 21 to a colon (:) and add two lines after line 21.
21 using python : 3.6 : "/usr" ;
After the modification:
21 using python : 3.6 : "/usr" : 22 "/usr/include/python3.6m" : 23 "/usr/lib" ;
- Add the following content below the last line of the file:
using mpi ;
- Change the semicolon (;) in line 21 to a colon (:) and add two lines after line 21.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the project-config.jam file.
- Run the following commands to perform the compilation and installation:
./b2 -j32 ./b2 install -j32
- Run the following commands to create a BOOST_ROOT variable and set the environment variable:
export BOOST_ROOT=/path/to/BOOST export LD_LIBRARY_PATH=/path/to/BOOST/lib:$LD_LIBRARY_PATH
Parent topic: Configuring the Compilation Environment