之前可能用apt-get install libboost-all-dev过,最好sudo find /usr -name "libboost*" 查看下安装在哪里。手动删除:
sudo apt-get remove libboost-all-dev -purge
下载boost源代码并解压到某个目录(假设为[boost-src]),然后编译boost(c++11 +python +fPIC)
./bootstrap --with-python=[python-bin-path]
./b2 cxxflags=-fPIC cflags=-fPIC --c++11
./b2 install
安装到/usr/bin 以及/usr/lib中