云凡教育分享-Flume-0.9.4源码编译依赖的thrift插件安装

Flume-0.9.4源码编译依赖的thrift插件安装

 关于如何编译Flume-ng 1.4.0可以参见本博客的《基于Hadoop-2.2.0编译flume-ng 1.4.0及错误解决》
  在编译Flume-0.9.4源码的时候出现了以下的错误信息:

01

[INFO] ------------------------------------------------------------------------

 

02

[INFO] Reactor Summary:

 

03

[INFO]

 

04

[INFO] Flume ............................................. SUCCESS [0.003s]

 

05

[INFO] Flume Core ........................................ FAILURE [5.016s]

 

06

[INFO] Flume Master Config Web Application ............... SKIPPED

 

07

[INFO] Flume Node Web .................................... SKIPPED

 

08

[INFO] Flume Distribution Project ........................ SKIPPED

 

09

[INFO] A log4j appender for Flume ........................ SKIPPED

 

10

[INFO] Flume Hello World Plugin .......................... SKIPPED

 

11

[INFO] Flume HBase Plugin ................................ SKIPPED

 

12

[INFO] ------------------------------------------------------------------------

 

13

[INFO] BUILD FAILURE

 

14

[INFO] ------------------------------------------------------------------------

 

15

[INFO] Total time: 5.798s

 

16

[INFO] Finished at: Wed Jan 22 16:35:13CST 2014

 

17

[INFO] Final Memory: 15M/136M

 

18

[INFO] ------------------------------------------------------------------------

 

19

[WARNING] The requested profile "dist" could not be activated because it does

 

20

not exist.

 

21

[ERROR] Failed to execute goal org.apache.thrift.tools:maven-thrift-plugin:

 

22

0.1.10:compile (default) on project flume-core: thrift did not exit cleanly.

 

23

Review output for more information. -> [Help 1]

 

24

[ERROR]

 

25

[ERROR] To see the full stack trace of the errors,re-run Maven with the -e switch.

 

26

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

 

27

[ERROR]

 

28

[ERROR] For more information about the errors and possible solutions, please read

 

29

the following articles:

 

30

[ERROR] [Help 1]

 

31

 

 

32

http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

 

33

 

 

34

[ERROR]

 

35

[ERROR] After correcting the problems, you can resume the build with the command

 

36

[ERROR]   mvn <goals> -rf :flume-core

这是因为编译Flume的时候需要用到thrift插件,可以参考flume-core/pom.xml文件里面的配置:

01

<plugin>

 

02

    <groupId>org.apache.thrift.tools</groupId>

 

03

    <artifactId>maven-thrift-plugin</artifactId>

 

04

    <version>0.1.10</version>

 

05

    <configuration>

 

06

      <thriftExecutable>${thrift.executable}</thriftExecutable>

 

07

    </configuration>

 

08

    <executions>

 

09

      <execution>

 

10

        <goals>

 

11

          <goal>compile</goal>

 

12

          <goal>testCompile</goal>

 

13

        </goals>

 

14

      </execution>

 

15

    </executions>

 

16

</plugin>

  如果你的电脑里面没有安装thrift插件的时候,就出出现错误,可以用下面的方法下载:

1

[wyp@master Desktop]$ git clone     \

 

2

               https://git-wip-us.apache.org/repos/asf/thrift.git thrift

  编译thrift的时候需要一些依赖,可以依次运行下面的命令解决:

1

[wyp@master Desktop]$  sudo yum install automake libtool flex bison pkgconfig \

 

2

           gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel

下载的文件都放在thrift文件夹里面,进入thrift文件夹依次运行下面的命令

1

[wyp@master Desktop]$ cd thrift

 

2

[wyp@master thrift]$ ./bootstrap.sh

 

3

[wyp@master thrift]$ ./configure

 

4

[wyp@master thrift]$ make

 

5

[wyp@master thrift]$ make install

这样将会成功的将thrift安装在/usr/local/bin/thrift里面。这样就可以解决编译Flume-0.9.4出现上述的错误。
在执行./configure时可能会出错:Error: libcrypto required.
在fedora下应该安装:

1

openssl-devel:yum install openssl-devel

  如果你在http://thrift.apache.org/网上下载thrift-0.9.1,在make的时候将会出现以下的错误:

01

libtool: link: ar cru .libs/libtestgencpp.a .libs/ThriftTest_constants.o

 

02

.libs/ThriftTest_types.o

 

03

ar: .libs/ThriftTest_constants.o: No such file or directory

 

04

make[3]: *** [libtestgencpp.la] 错误 1

 

05

make[3]: 离开目录“/home/wyp/Desktop/thrift-0.9.1/test/cpp”

 

06

make[2]: *** [all-recursive] 错误 1

 

07

make[2]: 离开目录“/home/wyp/Desktop/thrift-0.9.1/test”

 

08

make[1]: *** [all-recursive] 错误 1

 

09

make[1]: 离开目录“/home/wyp/Desktop/thrift-0.9.1”

 

10

make: *** [all] 错误 2

这是它源码的问题,不要用这种方法下载。

 

 

云帆教育大数据学院www.cloudyhadoop.com详情请加入QQ:374152400 ,咨询课程顾问!

关注云帆教育微信公众号yfteach,第一时间获取公开课信息。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值