安装Boost 支持 C++
编译安装除gcc和gcc-c++之外,还需要两个开发库:bzip2-devel 和python-devel,因此在安装前应该先保证这两个库已经安装:
# yum install gcc gcc-c++ bzip2 bzip2-devel bzip2-libs python-devel -y
boost 下载地址: http://www.boost.org/users/download/
编译安装,boost源码包中有配置脚本
./bootstrap.sh
.................
Bootstrapping is done. To build, run:
./b2
To adjust configuration, edit 'project-config.jam'.
Further information:
- Command line help:
./b2 --help
- Getting started guide:
http://www.boost.org/more/getting_started/unix-variants.html
- Boost.Build documentation:
http://www.boost.org/boost-build2/doc/html/index.html
编译(关注是否编译成功)
..................
The Boost C++ Libraries were successfully built!
安装:
#./b2 install --prefix=/usr/local
安装后
头文件在/usr/local/include/boost
库在/usr/local/lib/libboost_*
编译thrift遇到错误
trhift configure: error: "Error: libcrypto requ...
安装Thrift的时候遇到,如下错误
#./configure --prefix=/usr/local/thrift
trhift configure: error: "Error: libcrypto required."
解决办法:
安装 openssl openssl-devel (centOS)
#yum -y install openssl openssl-devel
# ./configure --prefix=/usr/local/thrift