[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Flume ............................................. SUCCESS [0.003s] [INFO] Flume Core ........................................ FAILURE [5.016s] [INFO] Flume Master Config Web Application ............... SKIPPED [INFO] Flume Node Web .................................... SKIPPED [INFO] Flume Distribution Project ........................ SKIPPED [INFO] A log4j appender for Flume ........................ SKIPPED [INFO] Flume Hello World Plugin .......................... SKIPPED [INFO] Flume HBase Plugin ................................ SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.798s [INFO] Finished at: Wed Jan 22 16:35:13 CST 2014 [INFO] Final Memory: 15M/136M [INFO] ------------------------------------------------------------------------ [WARNING] The requested profile "dist" could not be activated because it does not exist. [ERROR] Failed to execute goal org.apache.thrift.tools:maven-thrift-plugin: 0.1.10:compile (default) on project flume-core: thrift did not exit cleanly. Review output for more information. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors,re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :flume-core
这是因为编译Flume的时候需要用到thrift插件,可以参考flume-core/pom.xml文件里面的配置:
<plugin> <groupId>org.apache.thrift.tools</groupId> <artifactId>maven-thrift-plugin</artifactId> <version>0.1.10</version> <configuration> <thriftExecutable>${thrift.executable}</thriftExecutable> </configuration> <executions> <execution> <goals> <goal>compile</goal> <goal>testCompile</goal> </goals> </execution> </executions> </plugin>
如果你的电脑里面没有安装thrift插件的时候,就出出现错误,可以用下面的方法下载:
[wyp@master Desktop]$ git clone \ https://git-wip-us.apache.org/repos/asf/thrift.git thrift
编译thrift的时候需要一些依赖,可以依次运行下面的命令解决:
[wyp@master Desktop]$ sudo yum install automake libtool flex bison pkgconfig \ gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel
下载的文件都放在thrift文件夹里面,进入thrift文件夹依次运行下面的命令
[wyp@master Desktop]$ cd thrift [wyp@master thrift]$ ./bootstrap.sh [wyp@master thrift]$ ./configure [wyp@master thrift]$ make [wyp@master thrift]$ make install
这样将会成功的将thrift安装在/usr/local/bin/thrift里面。这样就可以解决编译Flume-0.9.4出现上述的错误。
在执行./configure时可能会出错:Error: libcrypto required.
在fedora下应该安装:
openssl-devel:yum install openssl-devel
libtool: link: ar cru .libs/libtestgencpp.a .libs/ThriftTest_constants.o .libs/ThriftTest_types.o ar: .libs/ThriftTest_constants.o: No such file or directory make[3]: *** [libtestgencpp.la] 错误 1 make[3]: 离开目录“/home/wyp/Desktop/thrift-0.9.1/test/cpp” make[2]: *** [all-recursive] 错误 1 make[2]: 离开目录“/home/wyp/Desktop/thrift-0.9.1/test” make[1]: *** [all-recursive] 错误 1 make[1]: 离开目录“/home/wyp/Desktop/thrift-0.9.1” make: *** [all] 错误 2
这是它源码的问题,不要用这种方法下载。