解决 Boost安装:fatal error: bzlib.h: No such file or directory 问题

参考:

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

posted @ 2018-03-13 22:09  Wasdns  阅读(10105)  评论(0编辑  收藏  举报