mac上安装thrift0.9.3

步骤

1.下载thrift0.9.3的安装包,进行解压。
2. 执行configure

./configure --prefix=/usr/local/ --with-boost=/usr/local --with-libevent=/usr/local --without-ruby --without-perl --without-php --without-nodejs

3.执行make,出现异常按3.3处理。
4. 执行make install
5. 安装完成后输入thrift -version,正常显示版本号

Thrift version 0.9.3

PS:
3.3 make时,报”configure: error: Bison version 2.5 or higher must be installed on the system!”,原因为osc上的预装的bison版本冲突,需要重新安装bison。步骤如下
3.3.1 从http://www.gnu.org/software/bison/ 上下载最新的bison.tar.gz,并解压。
3.3.2 进行configure, 用prefix指定目录

./configure --prefix=/Library/Developer/CommandLineTools/usr/bin/bison2

3.3.3 执行make
3.3.4 执行install,安装完成
3.3.5 将当前的bison重命名为bison.2.3,我的本机bison目录在/Library/Developer/CommandLineTools/usr/bin/上

cd /Library/Developer/CommandLineTools/usr/bin/
sudo mv bison bison.2.3

3.3.6 将新安装的bison重命为bison

cd /Library/Developer/CommandLineTools/usr/bin/bison2
sudo cp bison ..\

3.3.7 复制成功后,正常使用bison –help测试

你可能感兴趣的:(Java)