安装 Thrift 开发环境

Summary: Author: 张亚飞 | 阅读时间: 1 minute read | Published: 2018-08-08
Filed under Categories: DevOpsTags: Linux, Server, Software, DevOps,

Thrift 安装


快速安装

  • 由于编译安装 thrift 遇到很多问题,于是直接通过 apt install 安装 thrift
sudo apt update
sudo apt install thrift-compiler
Fri Dec 01 11:11:16 coam@bs:~$ thrift --version
Thrift version 0.9.1

Mac install Thrift

brew update
brew install thrift

安装相关依赖

  • 如果要支持 Java 需要安装以下库
sudo apt–get install ant
  • 安装 boost 库相关
sudo apt install libboost-dev libboost-test-dev libboost-program-options-dev libboost-filesystem-dev libboost-thread-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev

编译安装

/opt/data

wget http://mirrors.hust.edu.cn/apache/thrift/0.10.0/thrift-0.10.0.tar.gz
tar -zxvf thrift-0.10.0.tar.gz
cd thrift-0.10.0
./configure -without-lua
#./configure --with-boost=/usr/local/include -without-lua
sudo make -j2
sudo make install

由于服务器编译安装出现如下错误:

against `luaO_nilobject_' can not be used when making a shared object; recompile with -fPIC

所以编译的时候暂时排除编译lua ./configure -without-lua


Comments

Cor-Ethan, the beverage → www.iirii.com