Slack Docker Pulls GitHub edit source

Mac OS X

Before you can get Apache Thift installed, you will first need to setup command-line support. To do this, you will need to:

Install Xcode from the Mac App Store

Launch Xcode, open the Preferences, select Downloads, and install the “Command Line Tools for Xcode” component.


This section explains how to install Apache Thrift via Homebrew.

First, install Homebrew.

Here are the commands for Homebrew installation:

ruby -e "$(curl -fsSL"
brew doctor

Use Homebrew to install autoconf, automake, libtool and pkg-config:

brew install autoconf automake libtool pkg-config libevent

Use Homebrew to install Boost

brew install boost

Install Thrift

brew install thrift


This section explains how to install Apache Thrift via MacPorts.

If you use MacPorts, the following instructions may help.

Install MacPorts from sourceforge.

Update Port itself:

sudo port selfupdate

Use Port to install flex, bison, autoconf, automake, libtool and pkgconfig:

sudo port install flex, bison, autoconf automake libtool pkgconfig libevent

Use Port to install Boost

sudo port install boost

Try to use Port to install Thrift:

sudo port install boost

The last command MAY fail, according to this issue. In this case, we recommend building Thrift 0.9.2 from source (Assuming you use MacPort’s default directory /opt/local):

./configure --prefix=/opt/local/ --with-boost=/opt/local/lib --with-libevent=/opt/local/lib CXXFLAGS="-I/usr/include/4.2.1 -L/opt/local/lib"
make install

You may change CXXFLAGS. Here we include /usr/include/4.2.1 for std::tr1 on Mavericks and /opt/local/lib for libraries installed by port. Without the -I, the installation may fail with tr1/functional not found. Without the -L, the installation may fail during linking.




The following command installs all the required tools and libraries to build and install the Apache Thrift compiler on a Debian/Ubuntu Linux based system.

sudo apt-get install libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev ant python-dev


sudo yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel ant python-dev

Then install the Java JDK of your choice. Type javac to see a list of available packages, pick the one you prefer, and use your package manager to install it.

Debian Lenny Users need some packages from backports:

sudo apt-get -t lenny-backports install automake libboost-test-dev

Build Thrift:

./configure --with-boost=/usr/local
make install


The following steps can be used to setup a CentOS 6.4 system.

Install dependencies:

sudo yum install automake libtool flex bison pkgconfig gcc-c++ make

Upgrade autoconf to 2.69 (yum will most likely pull 2.63 which won’t work with Apache Thrift):

sudo yum install ''

Download and install Apache Thrift source:

wget ''
tar zxvf 0.9.2
cd thrift-0.9.2/
./configure --enable-libs=no
sudo make install

Generate Java files from Thrift

Alluxio defines a its RPC services using the thrift file located in:


and generates Java files from it into:


To regenerate the java files if the thrift file is modified, you can run:

./bin/alluxio thriftGen