CentOS安装thrift

下载thrift依赖的东西 
yum -y install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel crypto-utils
openssl openssl-devel


下载最新版本thrift,网址:http://thrift.apache.org
 
tar -zxvf thrift-0.9.0.tar.gz

移到默认安装目录 
cp -r thrift-0.9.0 /usr/local/   (默认安装目录?否则可能影响到生成的thrift bin文件虽然有生成,但是找不到,安装在这里的话可以生成的thrift就在/usr/local/bin里了,这时终端输入thrift就有了,否则command not found.当然/usr/local/bin原先应该设置在$PATH里)
 
cd /usr/local/thrift-0.9.0

./bootstrap.sh (有You should add the contents of `./aclocal/libtool.m4' to `aclocal.m4'. glibtoolize: You should add the contents of `./aclocal/ltoptions.m4' to `aclocal.m4'. glibtoolize ...关于libtoolize,不管,继续下面的命令)
 
./configure --with-boost=/usr/include/ 因为boost安装在/usr/include里? 
非常重要:可能这里有一个关于libtool的错误Version mismatch error. This is libtool 2.2.4, but the libtool: definition of this LT_INIT comes from libtool 2.2.6. libtool: You should recreate aclocal.m4 with macros from libtool 2.2.4 libtool: and run autoconf again.
 

make 
make install

在终端输入thrift,有下面的东东,ok,install thrift success. 
thrift bin文件在/usr/local/bin里 
Usage: thrift [options] file 
Options: 
  -version    Print the compiler version 
  -o dir      Set the output directory for gen-* packages 
               (default: current directory) 
  -I dir      Add a directory to the list of directories 
                searched for include directives 
  -nowarn     Suppress all compiler warnings (BAD!)

转载于:https://www.cnblogs.com/iplus/p/4489941.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值