please have a look at:
http://thrift.apache.org/docs/install/