今天开始安装配置Ubuntu开发环境(Ubuntu 12.04)。在干活之前就预计到会遇到很多问题,但是没想到一开始就卡壳,可能是linux中各种包的依赖关系太复杂了,决定写个帖子记录一下,免得以后再踩雷。

 

./boost/python/detail/wrap_python.hpp:75:24: fatal error: patchlevel.h: No such file or directory
compilation terminated.

解决办法
sudo apt-get install python-dev


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.

解决办法
sudo apt-get install libbz2-dev

 

sudo ./b2重新再编译,等待几分钟之后,终于见到了成功的信息

 

The Boost C++ Libraries were successfully built!

The following directory should be added to compiler include paths:

/usr/local/boost_1_59_0

The following directory should be added to linker library paths:

/usr/local/boost_1_59_0/stage/lib