我要评分
获取效率
正确性
完整性
易理解

Installing Boost

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Run the following command to decompress the Boost installation package:
    tar -xvf boost_1_72_0.tar.gz
  3. Run the following command to go to the directory generated after decompression:
    cd boost_1_72_0
  4. 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
  5. Run the following commands to modify the project-config.jam file:
    1. Open the project-config.jam file.
      vi project-config.jam
    2. 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.

        Before the modification:

        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 ;
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  6. Run the following commands to perform the compilation and installation:
    ./b2 -j32
    ./b2 install -j32
  7. 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