Fer*_*and 55 command-line libraries
我在完全安装 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 <pbin.v2/libs/iostreams/build/gcc-4.6/release/threading-multi>libboost_iostreams.so.1.50.0 for lack of <pbin.v2/libs/iostreams/build/gcc-4.6/release/threading-multi>bzip2.o...
...skipped <p/usr/local/lib>libboost_iostreams.so.1.50.0 for lack of <pbin.v2/libs/iostreams/build/gcc-4.6/release/threading-multi>libboost_iostreams.so.1.50.0...
...skipped <p/usr/local/lib>libboost_iostreams.so for lack of <p/usr/local/lib>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 <pbin.v2/libs/iostreams/build/gcc-4.6/release/link-static/threading-multi>libboost_iostreams.a(clean) for lack of <pbin.v2/libs/iostreams/build/gcc-4.6/release/link-static/threading-multi>bzip2.o...
...skipped <pbin.v2/libs/iostreams/build/gcc-4.6/release/link-static/threading-multi>libboost_iostreams.a for lack of <pbin.v2/libs/iostreams/build/gcc-4.6/release/link-static/threading-multi>bzip2.o...
...skipped <p/usr/local/lib>libboost_iostreams.a for lack of <pbin.v2/libs/iostreams/build/gcc-4.6/release/link-static/threading-multi>libboost_iostreams.a...
...failed updating 2 targets...
...skipped 6 targets...
Run Code Online (Sandbox Code Playgroud)
我试过重新安装 zlib 和其他存档工具,如 bzip2,但没有成功。
Eri*_*lho 70
包libboost-all-dev安装所有的开发库。包装说明摘录:
这个元包提供了完整的 Boost 开发环境,包括所有单独打包的库。
安装它:
sudo apt-get install libboost-all-dev
Run Code Online (Sandbox Code Playgroud)
如果找不到包,请确保启用了Universe 存储库。
标头位于或中的/usr/include/boost库中。/usr/lib/x86_64-linux-gnu/usr/lib/i386-linux-gnu
小智 37
并非特定于 Boost,但要获取库的头文件(例如:bzlib.h),您需要为其安装dev包:
sudo apt-get install libbz2-dev
Run Code Online (Sandbox Code Playgroud)
通常,要查找包含文件的包,请使用apt-file:
sudo apt-get install apt-file
apt-file update
apt-file search bzlib.h
Run Code Online (Sandbox Code Playgroud)
我认为有一个用于 boost 库的元包,尽管我不记得它的名字。