sudo apt-get install Libboost-dev
However, after I installed this, there were a lot of errors in compiling the program, and all the errors in the system files. I started to think it was my boost library version was wrong, and later changed several versions, the same problem occurred. Later, I compiled a boost.1.42. Then the program passed smoothly. I thought about it later, probably because the boost from the above command was installed by default and did not turn on MPI when compiling the package. And my program needs this feature. Here are the brief steps for the installation (I compiled boost1.42 and boost1.50, both of which are installed in the same way, and later for example): www.2cto.com 1. Download boost1.53 source file (93.56M)/HTTP/ SOURCEFORGE.NET/PROJECTS/BOOST/FILES/LATEST/DOWNLOAD?SOURCE=DLP 2. After decompression, enter the Boost_1_53_0 directory, execute:./bootstrap.sh 3. (emphasis) Modify the Tools/build/v2/user-config.jam file, with the following line "using MPI;" (Note that there is a space behind the MPI, then a semicolon) 4. Implementation:./B2 5. Execute: sudo./b2 install above is the whole installation process, because the online mentioned more, so here withheld. The point is to mention the third step, be sure to remember. However, it doesn't matter if your program doesn't need the MPI feature. Apply the default settings. Moreover, the fourth step, the implementation can be at the back of the home prefix parameters, if not added, installed, the default header file in the/usr/local/include/boost directory. The library file is in the/usr/local/lib/directory. Not modified by default. If the program is compiled and you are prompted to fail to load a library file at run time, then all the Boost library files under/usr/local/lib will be MV to the/usr/lib directory.
Linux Boost installation