默认安装方式
-
https://www.boost.org,官网下载 ***.tar.gz 离线安装包
-
sh ./bootstrap.sh
-
安装
./b2 install
指定安装目录方式
-
https://www.boost.org,官网下载 ***.tar.gz 离线安装包
-
sh ./bootstrap.sh --prefix=路径
-
安装
./b2 install
如果在运行还是找不到boost,添加环境变量
export CPLUS_INCLUDE_PATH=Your_Path/include:$CPLUS_INCLUDE_PATH
export LIBRARY_PATH=Your_Path/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=Your_Path/lib:$LD_LIBRARY_PATH
安装结果测试:gcc ***
#include <boost//thread/thread.hpp>
using namespace std;
标签:安装,离线,LIBRARY,sh,linux,PATH,boost
From: https://www.cnblogs.com/lhx9527/p/16921992.html