安装Thrift+Scribe

首先安装一个最新版本的autoconf,否则后面编译的时候会出问题(提示说autoconf版本要2.65以上才行)

wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz

tar xvf autoconf-2.69.tar.gz

cd autoconf-2.69

./configure --bindir=/usr/bin

make && make install

更新依赖库

yum install libevent libevent-develpython-devel

yum install gcc-c++

yum install libtool

yum install automake

yum install byacc flex

安装boost(推荐选择1.45版本,否则后面会碰到问题,折腾)

wget http://jaist.dl.sourceforge.net/project/boost/boost/1.45.0/boost_1_45_0.tar.gz

tar -xf boost_1_45_0.tar.gz

cd boost_1_45_0

./bootstrap.sh

./bjam install --prefix=/usr/local/bootstrap

安装thrift

wget --no-check-certificate https://dist.apache.org/repos/dist/release/thrift/0.8.0/thrift-0.8.0.tar.gz

tar xzf thrift-0.8.0.tar.gz

cd thrift-0.8.0

--with-php-config=/usr/local/php/bin/php-config

./configure --with-boost=/usr/local/bootstrap/ --with-java --prefix=/usr/local/thrift

make && make install

安装fb303(注意,fb303是thrift的一个子目录,在thrift-0.8.0里面)

cd thrift-0.8.0/contrib/fb303

./bootstrap.sh --prefix=/usr/local/thrift/fb303 --with-boost=/usr/local/bootstrap/ --with-thriftpath=/usr/local/thrift/

./configure --prefix=/usr/local/thrift/fb303 --with-boost=/usr/local/bootstrap/ --with-thriftpath=/usr/local/thrift/ CPPFLAGS="-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H"

安装Facebook-scribe

wget --no-check-certificate  https://nodeload.github.com/facebook/scribe/tarball/master

tar xf facebook-scribe-63e4824.tar.gz

cd facebook-scribe-63e4824

export BOOST_ROOT=/usr/local/bootstrap/

export LD_LIBRARY_PATH=/usr/local/thrift/lib:/usr/lib:/usr/local/lib:/usr/local/bootstrap/lib/

./bootstrap.sh --prefix=/usr/local/scribe --with-boost=/usr/local/bootstrap/ --with-thriftpath=/usr/local/thrift/  --with-fb303path=/usr/local/thrift/fb303

注意,安装thrift或者scribe的时候,可能会遇到编译不过的问题thrift/protocol/TBinaryProtocol.tcc:147: error: there are no arguments to ‘htons‘ that depend on a template parameter, so a declaration of ‘htons‘ must be available

需要自己修改一下文件:

vim /usr/local/thrift/include/thrift/protocol/TBinaryProtocol.tcc

在首行添加头文件引用: #include <arpa/inet.h>

参考资料:

http://mail-archives.apache.org/mod_mbox/thrift-user/201112.mbox/%[email protected].com%3E

http://www.cnblogs.com/hitwtx/archive/2012/02/10.html

http://abentotoro.i.sohu.com/blog/view/190515962.htm

https://github.com/facebook/scribe

http://kpumuk.info/development/installing-and-using-scribe-with-ruby-on-mac-os/

http://wudaolin.com/?tag=php

http://flysky.fm1062.com/post/20100911-1.aspx

https://github.com/facebook/scribe/downloads

https://bitbucket.org/chrta/thrift/src/32433af09b99/bootstrap.sh

http://slaytanic.blog.51cto.com/2057708/716580

https://bitbucket.org/chrta/thrift/src/32433af09b99/bootstrap.sh

http://thrift.apache.org/download/

http://hi.baidu.com/izouying/item/9690fc355792d6d76d15e912

        转自  http://blog.csdn.net/zouyongjin/article/details/7953066

时间: 2024-08-08 17:53:43

安装Thrift+Scribe的相关文章

linux安装thrift

安装配置Thrift Thrift的编译器使用C++编写的,在安装编译器之前,首先应该保证操作系统基本环境支持C++的编译,安装相关依赖的软件包,如下所示 sudo yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel openssl-devel 下载Thrift的软件包,并解压缩: wget http://mi

mac os x10.10 安装thrift

http://thrift.apache.org/docs/install/ 一:安装最新版(自动安装) 最简单的是用homebrew进行安装 安装homebrew 在终端输入ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" 安装thrift   brew install thrift 用brew安装的thrift版本是0.9的,but,我们项目中得thrift版本是0.8的,所以果断

Mac下安装Thrift

在mac下安装软件跟Linux安装比较类似,在安装Thrift之前需要先安装依赖. 1.安装BOOST 下载:http://www.boost.org/    (boost_1_57_0.tar.gz) 解压:tar -zvxf boost_1_57_0.tar.gz 切换目录:cd boost_1_57_0 命令:./bootstrap.sh,该命令用于生成bjam可执行文件,这个东西就是用来编译boost库 命令:sudo ./b2 threading=multi address-model

linux安装thrift库

系统环境: [email protected] ~/t/gen-cpp> lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.3 LTS Release: 14.04 Codename: trusty [email protected] ~/t/gen-cpp> git:https://github.com/li-chunli/thrift_study thr

centos7安装thrift

1. 升级所有软件包 yum -y update 2.安装开发工具 yum -y groupinstall "Development Tools" 3.安装wget yum -y install wget 4.升级autoconf/automake/bison autoconf和automake两个工具来帮助我们自动地生成符合自由软件惯例的Makefile GNU bison 是属于 GNU 项目的一个语法分析器生成器.Bison 把一个关于"向前查看 从左到右 最右&quo

mac 安装thrift

参考:http://thrift.apache.org/docs/install/os_x 1.安装boost 2.然后安装libevent 3.安装libevent 4.下载thrift源码,进入thrift目录中,配置并make,提示openssh.h未找到,因为我没有安装openssl. 解决方法:下载openssl源码,编译安装到/usr/local/openssl目录,然后将/usr/local/openssl/include目录拷贝到thrift的目录下,然后再进行make即可. 在

编译安装thrift和使用autoconf,automake生成Makefile文件

http://thrift.apache.org/docs/install/centos http://blog.csdn.net/kevinhwm/article/details/8640762 http://www.cnblogs.com/hnrainll/archive/2013/01/06/2847069.html http://www.ibm.com/developerworks/cn/linux/l-makefile/

window 安装 thrift

1.下载thrift:http://thrift.apache.org/ 2.然后将该执行文件,保存到磁盘的文件夹下(你自己喜欢的,随便一个个目录下) 我的是(目录名少了个t,无妨): 3.把该执行文件配置到环境变量下(系统的path): 只需要配置到文件夹即可:即:path  = e:\bobo\thrif; 4.最后就可以在本机任何地方使用:thrift --gen java XXX.thrift 生产java 源码.

ubuntu 安装thrift 0.9.2

下载源码,依赖,默认ubuntu 13.10的libboost版本不够新,需要下载libboost1.54-all-dev,libboost-test1.54-dev java dependency <dependency> <groupId>org.apache.thrift</groupId> <artifactId>libthrift</artifactId> <version>0.9.2</version> <