`
gushuizerotoone
  • 浏览: 173822 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

安装thrift

阅读更多
小白装个小东西总是要搞n久 T_T

下载thrift依赖的东西
sudo apt-get install python-dev

sudo apt-get install libboost-dev automake libtool flex bison pkg-config g++



下载最新版本thrift
wget http://apache.freelamp.com/incubator/thrift/0.2.0-incubating/thrift-0.2.0-incubating.tar.gz

tar -zxvf thrift-0.2.0-incubating.tar.gz


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

cd /usr/local/thrift-0.2.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.

这是由于libtool版本不一致引起的,终端输入libtool --version可以看出我们的版本是libtool 2.2.4(在/usr/bin里)。但是/usr/local/thrift-0.2.0里的libtool是2.2.6的,所以用/usr/bin的libtool复制到/usr/local/thrift-0.2.0中,覆盖原来的版本。再执行上面的./configure --with-boost=/usr/include/  命令,ok~~


sudo make

sudo 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!)
分享到:
评论
2 楼 yuchao86 2013-12-16  
src/ext/thrift_protocol/modules/thrift_protocol.so] Error 2

我编译0.9.1也遇到同样的错误。
1 楼 灵魂工程师 2013-10-11  
-intel-2.7/src/protocol/fastbinary.o -o build/lib.macosx-10.8-intel-2.7/thrift/protocol/fastbinary.so
Making all in rb
make[3]: Nothing to be done for `all'.
Making all in perl
Making all in test
make[4]: Nothing to be done for `all'.
/usr/bin/perl Makefile.PL MAKEFILE=Makefile-perl.mk INSTALLDIRS=vendor INSTALL_BASE=/usr/local
Writing Makefile-perl.mk for Thrift
make -f Makefile-perl.mk
cp lib/Thrift/Server.pm blib/lib/Thrift/Server.pm
cp lib/Thrift/Protocol.pm blib/lib/Thrift/Protocol.pm
cp lib/Thrift/BinaryProtocol.pm blib/lib/Thrift/BinaryProtocol.pm
cp lib/Thrift/Socket.pm blib/lib/Thrift/Socket.pm
cp lib/Thrift/FramedTransport.pm blib/lib/Thrift/FramedTransport.pm
cp lib/Thrift/BufferedTransport.pm blib/lib/Thrift/BufferedTransport.pm
cp lib/Thrift/Transport.pm blib/lib/Thrift/Transport.pm
cp lib/Thrift/HttpClient.pm blib/lib/Thrift/HttpClient.pm
cp lib/Thrift/MemoryBuffer.pm blib/lib/Thrift/MemoryBuffer.pm
cp lib/Thrift.pm blib/lib/Thrift.pm
find blib -name 'Makefile*' -exec rm -f {} \;
Making all in php
Making all in test
make[4]: Nothing to be done for `all'.
cd src/ext/thrift_protocol/ \
  && make
make[5]: *** No targets specified and no makefile found.  Stop.
make[4]: *** [src/ext/thrift_protocol/modules/thrift_protocol.so] Error 2
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

相关推荐

    虚拟机Centos安装thrift

    虚拟机Centos安装thrift涉及到的操作系统环境是Linux,尤其是Centos版本的操作系统。Thrift是一个跨语言的服务开发框架,它主要用于开发可扩展的跨语言服务。以下是根据提供的文件信息整理的详细知识点。 1. 下载...

    thrift win7 安装与使用

    #### 二、安装Thrift环境准备 本文介绍如何在Windows环境下使用Visual Studio 2010进行Thrift的安装与使用。整个安装过程将绕过Cygwin或MinGW,仅依赖于Visual Studio 2010和从Thrift官网下载的源文件。适用于thrift...

    mac thrift 0.9.3安装

    mac 想安装低版本thrift 0.9.3太难了,高版本比较简单 直接执行 brew install thrift.rb 即可安装

    MacOS10.6下编译安装Thrift的详细步骤

    Thrift是一个各种语言开发的中间连接件,是用Java开发的源码模组插件包 可以单独编译安装.可是很多时候 按照官方提供的步骤都是不成功的的. 更要命的问题是,官方采用了SVN自动文件更新服务,在编译过程中有自动连接SVN...

    thrift_sasl-0.3.0.tar.gz

    Thrift SASL 0.3.0 是一个用于在分布式系统中实现安全传输层协议的开源库。Thrift 是一个跨语言的服务开发框架,而SASL(Simple Authentication and Security Layer)则是它的一个扩展,提供了身份验证和数据保护...

    thrift环境配置方法

    本文介绍了 Thrift 环境配置的方法,包括安装 MacPorts、Boost、Xcode 和 Command Line Tools、libevent 和 Thrift 等步骤。按照这些步骤,开发者可以轻松地配置好 Thrift 环境,实现高性能的服务之间的远程过程调用...

    使用wireshark抓取thrift协议接口调用

    - 安装Thrift dissector:可以从Wireshark的官方插件页面或者GitHub等第三方源获取Thrift dissector的最新版本,按照指示进行安装。 - 重新启动Wireshark:安装插件后,重启Wireshark,Thrift协议应该已经在解码器...

    Apache Thrift 使用说明

    在 Ubuntu 系统下安装 Thrift,首先要确保安装了必要的依赖包,例如 libboost、libevent、automake、libtool、flex、bison 和 g++。这些包可以通过 `sudo apt-get install` 命令来安装。接着,从 Apache Thrift 的...

    php_thrift_python安装测试记录

    对于CentOS系统,可以使用以下命令安装Thrift: ```bash sudo yum install thrift-devel ``` 然后,使用Thrift编译器将.thrift文件转换为PHP和Python的代码: ```bash thrift --gen php my_service.thrift thrift...

    Thrift-0.5.exe

    这个exe文件是一个可执行程序,用户可以通过运行它来安装Thrift的Windows环境,包括编译器、库文件以及必要的工具。安装过程通常包括以下步骤: 1. 下载并运行`Thrift-0.5.exe`。 2. 接受许可协议,按照安装向导的...

    thrift java build jar

    总结,使用 Thrift 在 Java 环境下构建 `.jar` 文件涉及了多个步骤,包括安装 Thrift、编写 IDL、生成 Java 代码、构建项目以及打包。这个过程有助于实现跨语言服务通信,提高系统的可扩展性和效率。通过遵循上述...

    thrift0.12.0 Ubuntu 安装包及安装教程.tar.xz

    thrift0.12.0 Ubuntu 安装包及安装教程.tar.xz

    windows环境下thrift.exe的使用

    安装Thrift.exe非常简单,只需将thrift-0.9.0.exe文件放置到系统路径中的一个目录下,例如`C:\Tools`,这样可以在命令行中直接调用。然后,你可以通过在命令行输入`thrift --version`来验证安装是否成功,如果能看到...

    thrift在windows下生成C#代码

    1. **安装Thrift编译器**: 首先,你需要下载Thrift编译器。压缩包中的`thrift-0.9.0.exe`是一个可执行文件,这表明你已经有了Thrift的Windows版本。双击运行或在命令行中使用该文件可以进行安装和使用。 2. **...

    thrift环境搭建(内附thrift运行环境可执行程序、搭建说明文本)

    对于Unix-like系统(如Linux或macOS),进入解压后的目录,执行以下命令来编译和安装Thrift: ``` ./bootstrap.sh ./configure make sudo make install ``` 对于Windows,你可以使用Cygwin或者Visual Studio...

    linux下安装和测试thrift

    接下来,配置、编译并安装Thrift: ```bash ./bootstrap.sh ./configure make sudo make install ``` 在安装完成后,为了确认Thrift已经成功安装,你可以通过运行`thrift --version`来查看其版本信息。 现在,我们...

    在Windows系统下安装Thrift的方法与使用讲解

    一、安装Thrift 在Windows系统下安装Thrift的方法非常简单。首先,需要从Apache官方网站下载Thrift的安装包,下载地址为http://archive.apache.org/dist/thrift/0.10.0/。下载完成后,将thrift-0.10.0.exe文件放到...

    thrift操作Hbase数据库

    在C#环境中,我们需要安装Thrift的C#绑定库,并使用Thrift编译器将Hbase的Thrift IDL文件转换为C#代码。这些生成的代码包含了Hbase服务的客户端类,用于创建连接、执行操作等。 3. **连接Hbase** 使用Thrift生成...

    python通过thrift访问hbase.docx

    安装 Thrift 后,我们可以使用 Thrift 生成 Python 客户端代码,用于访问 HBase。 生成 Python 客户端代码后,我们可以使用 Python 客户端代码来访问 HBase。首先,我们需要启动 HBase 的 Thrift 服务,并创建 ...

    thrift入门教程+代码

    1. 安装Thrift编译器:根据操作系统和需求,从Apache Thrift官网下载相应版本的编译器。 2. 编写IDL文件:定义你的服务接口和数据类型。 3. 生成代码:运行Thrift编译器,指定输入的IDL文件和目标语言,编译器会...

Global site tag (gtag.js) - Google Analytics