编译boost
下载boost
https://boostorg.jfrog.io/artifactory/main/release/
编译
wget https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.gz
tar -xvf boost_1_81_0.tar.gz
cd boost_1_81_0
./bootstrap.sh --with-libraries=all --with-toolset=gcc --without-libraries=python
./b2
./b2 install --prefix=/usr/local/boost
其他提示:
1.如果是 arm,报错为 选项 -m64 not found或者 unrecognized command line option ‘-m64’ 错误,请修改 bin.v2/project-cache.jam 文件内的arm- 值为true,然后执行 ./b2 &&./b2 install
2.如果是 fatal error: pyconfig.h: 没有那个文件或目录 ---- apt install python3.7-dev 删除目录重新生成
3.如果是 libs/iostreams/src/bzip2.cpp:20:56: fatal error: bzlib.h: No such file or directory :安装bzip2库即可 - yum install bzip2-devel.x86_64
./b2 的结果如下,即为编译成功:
common.copy stage/lib/libboost_wave.a
...updated 950 targets...
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
/usr/local/boost
The following directory should be added to linker library paths:
/usr/local/boost
[root@localhost boost_1_58_0]#

1380

被折叠的 条评论
为什么被折叠?



