參考:
How to install all the boost development libraries?
解決 Boost安裝:fatal error: bzlib.h: No such file or directory 問題
在安裝boost時,步驟./b2
出現如下錯誤:
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.9.4/release/link-static/threading-multi/bzip2.o
libs/iostreams/src/bzip2.cpp:20:56: fatal error: bzlib.h: No such file or directory
#include "bzlib.h" // Julian Seward's "bzip.h" header.
^
compilation terminated.
搜索后發現Boost依賴bzlib.h尚未安裝,通過以下步驟解決問題:
sudo apt-get install libboost-all-dev
sudo apt-get install libbz2-dev
2018.3