mac安装 thrift

参考:https://thrift.apache.org/docs/install/

0、先安装基础组件:

  • jdk
  • apache ant

1、下载、解压:

2、编译、安装:

  2.1、 执行configure(如果出现“configure: error: Bison version 2.5 or higher must be installed on the system!”, 跳到步骤3

 
 ./configure --prefix=/usr/local/thrift  --without-ruby --without-perl --without-php --without-nodejs  --without-swift  --without-python

  2.2、

make
make install

       2.3、是否成功:

/usr/local/thrift/bin/thrift -version

  2.4、配置环境变量:

 
 

3、如果出现“configure: error: Bison version 2.5 or higher must be installed on the system!”,升级bison:

3.1、下载并解压:bison-3.7.6 ( http://ftp.gnu.org/gnu/bison/ )

 

3.2、编译、安装:

./configure && make -j$(getconf _NPROCESSORS_ONLN) && make install

3.3、是否成功:

bison -V

如图:

原文地址:https://www.cnblogs.com/muzhongjiang/p/15794135.html