Mac安装thrift

it2023-06-10  70

Mac下安装thrift 0.8.0 1:下载

[github](https://github.com/apache/thrift/releases/tag/0.8.0) 2:依赖

// 安装依赖 brew install autoconf automake libtool pkg-config brew install boost

3:编译安装

# 1. 生成configure thrift-0.8.0/bootstrap.sh # 2. 配置安装位置及只安装java生成 thrift-0.8.0/configure --prefix=/usr/local/ --with-boost=/usr/local --with-libevent=/usr/local --without-csharp --without-erlang --without-go --without-haskell --without-ruby --without-cpp --without-perl --without-php --without-php_extension --without-python # 3. 编译 make -j4 # 4. 安装 sudo make install

 

4:安装异常

fatal error: 'thrifty.h' file not found

解决方法:

搜索并用“thrifty.hh”替换“thrifty.h”,然后重新编译

 

5:验证

yangzeyi@yangzeyideMacBook-Pro thrift-0.8.0 % thrift -version

Thrift version 0.8.0

yangzeyi@yangzeyideMacBook-Pro thrift-0.8.0 % 

至此安装成功!!!

最新回复(0)