如何安装所有的boost开发库?

我无法完全安装boost库,它失败/跳过几件似乎对我来说继续使用它编译程序的关键。 这是我安装boost时得到的,

gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.6/release/threading-multi/bzip2.o libs/iostreams/src/bzip2.cpp:20:56: fatal error: bzlib.h: No such file or directory compilation terminated. "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_IOSTREAMS_DYN_LINK=1 -DBOOST_IOSTREAMS_USE_DEPRECATED -DNDEBUG -I"." -c -o "bin.v2/libs/iostreams/build/gcc-4.6/release/threading-multi/bzip2.o" "libs/iostreams/src/bzip2.cpp" ...failed gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.6/release/threading-multi/bzip2.o... ...skipped libboost_iostreams.so.1.50.0 for lack of bzip2.o... ...skipped 

libboost_iostreams.so.1.50.0 for lack of libboost_iostreams.so.1.50.0... ...skipped

libboost_iostreams.so for lack of

libboost_iostreams.so.1.50.0... gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.6/release/link-static/threading-multi/bzip2.o libs/iostreams/src/bzip2.cpp:20:56: fatal error: bzlib.h: No such file or directory compilation terminated. "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -DBOOST_ALL_NO_LIB=1 -DBOOST_IOSTREAMS_USE_DEPRECATED -DNDEBUG -I"." -c -o "bin.v2/libs/iostreams/build/gcc-4.6/release/link-static/threading-multi/bzip2.o" "libs/iostreams/src/bzip2.cpp" ...failed gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.6/release/link-static/threading-multi/bzip2.o... ...skipped libboost_iostreams.a(clean) for lack of bzip2.o... ...skipped libboost_iostreams.a for lack of bzip2.o... ...skipped

libboost_iostreams.a for lack of libboost_iostreams.a... ...failed updating 2 targets... ...skipped 6 targets...

我曾尝试重新安装zlib,以及其他存档工具,如bzip2,但没有运气。

libboost-all-dev安装所有开发库。 包装说明摘录:

这个元数据包提供了完整的Boost开发环境,包括所有单独打包的库。

安装它:

 sudo apt-get install libboost-all-dev 

如果找不到包,请确保已启用Universe存储库 。

标头位于/usr/include/boost/usr/lib/x86_64-linux-gnu/usr/lib/i386-linux-gnu

不是特定于Boost,而是为了获取库的头文件(例如:bzlib.h),您需要为它安装dev包:

 sudo apt-get install libbz2-dev 

通常,要查找包含文件的包,请使用apt-file

 sudo apt-get install apt-file apt-file update apt-file search bzlib.h 

我认为有一个用于升级库的元数据包,虽然我不记得它的名字。