安装
boost网站 http://www.boost.org/
解压boost目录,.7z格式使用p7zip命令解压(sudo apt-get install一下)
sudo apt-get install p7zip
p7zip -d ***.7z//解压文件,没有-d就是压缩
boost的安装特别友好,进入目录执行
./bootstrap.sh
然后会生成一个b2文件
使用 ./b2 --help 查看 选项
如果没记错的话是 ./b2 -a //rebuild everything
等待编译完成
然后
sudo ./b2 install
完成安装之后
/usr/local/include/boost 下面会出现头文件
/usr/local/lib下面会出现 libboost××.so等一系列库
一些问题
sudo apt-get install libboost-dev
安装
或者是
sudo aptitude search libboost
或者是
sudo apt-cache search libboost
会出现一些可以选择的版本,然后再apt-get install
不过我这样安装/usr/local/lib目录下面没有库,出现在/usr/lib/x86_64_linux_gnu目录下面,大概是这个目录。
不知道为什么,还是重新编译安装比较好
sudo apt-get autoremove libboost-dev
这样可以移除boost