wget http://mirrors.cnnic.cn/apache/thrift/0.9.3/thrift-0.9.3.tar.gz
tar -zxf thrift-0.9.3.tar.gz
yum -y install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel openssl-devel
./configure --with-lua=no && make && make install
在 make
這一步會發生一個錯誤 g++: error: /usr/lib64/libboost_unit_test_framework.a: No such file or directory
,
錯誤原因是:./configure
的時候是默認編譯32位的,不會在 /usr/lib64/
下產生文件
修改方法:先查找文件 find / -name libboost_unit_test_framework.a
,比如在 /usr/local/lib/libboost_unit_test_framework.a
,就可以做如下操作,sudo ln -s /usr/local/lib/libboost_unit_test_framework.a /usr/lib64/libboost_unit_test_framework.a
,然後重新執行 make
thrift -version