thrift 的安装编译

thrift 的安装编译

1 : 从官网下载最新的包 http://thrift.apache.org/download thrift-0.9.3.tar.gz

2 :解压 thrift-0.9.3.tar.gz 包; tar -zxvf thrift-0.9.3.tar.gz 生成目录 thrift-0.9.3

3 :进入thrift-0.9.3 目录 执行 ./configurate --with-java

执行过程中如果出现错误 error: Bison version 2.5 or higher must be installed on the system!  说明 Bison 版本低了 需要重新装下

	wget http://ftp.gnu.org/gnu/bison/bison-3.0.4.tar.gz
	tar -zxvf bison-3.0.4.tar.gz
	cd bison-3.0.4
	./configure
	make && make install

4 : make && make install

5 : mavne 配置插件 支持 代码自动生成;执行mvn clean install 后即可重新生成源文件

<build>
        <plugins>
            <plugin>
                <groupId>org.apache.thrift.tools</groupId>
                <artifactId>maven-thrift-plugin</artifactId>
                <version>0.1.11</version>
                <executions>
                    <execution>
                        <id>thrift-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>thrift-test-sources</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

转载于:https://my.oschina.net/hxlzpnyist/blog/734275

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值