在Mac OS X 10.9上安装 Thrift 0.9.1

Thrift 0.9.1 官方文档中对于Mac OS X上的安装描述适合 10.8,但不适用于10.9。 

Homebrew  macport 默认都不能在 10.9上安装Thrift 0.9.1成功

经过实验,安装步骤如下:

(安装步骤中如果出现缺少目录的提示,就手动创建目录)

1、安装 autoconf2.65 automake 1.11.6,采用默认安装方式

2、设置java环境变量 JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Home

安装 Boost,此步骤可以按照官方文档进行

安装 libevent,此步骤可以按照官方文档进行

3、从github 获得thrift-0.9.1.zip(不要使用官方提供的安装包否则会遇到n多坑),https://github.com/apache/thrift/tree/0.9.1

4、在解压后的thrift目录中运行./bootstrap.sh

5、执行 export CXXFLAGS="-std=c++11"

6、./configure --prefix=/usr/local/thrift-0.9.1 --without-ruby --without-haskell --without-erlang --without-python --without-perl(参数根据需要进行设定)

7、make CXXFLAGS=-stdlib=libstdc++

8、sudo make install

安装完成

文章与我的blog同步  http://www.cnblogs.com/akwei/p/3674974.html

猜你喜欢

转载自ak478288.iteye.com/blog/2050005