1. 下载boost:http://www.boost.org/
2. 解压3. 添加一个BOOST_ROOT环境环境变量:vi ~/.bash_profileexport BOOST_ROOT=$HOME/boost_1_58_04. 安装cd $HOME/boost_1_58_0./bootstrap.sh --prefix=$HOME/./b2 install -j305. 配置库和头文件的环境变量vi ~/.bash_profileexport PATH=$PATH:$HOME/binexport C_INCLUDE_PATH=$C_INCLUDE_PATH:$HOME/includeexport CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$HOME/includeexport LIBRARY_PATH=$LIBRARY_PATH:$HOME/libexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/lib