1 Download Apache Thrift
http://thrift.apache.org/download/
2 install pkg
sudo apt-get install libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev
3 install thrift
$ tar -xzvf thrift-0.8.0.tar.gz
$ ./configure
$ make
$ sudo make install
$ whereis thrift