ant重新编译打包hadoop-core-1.2.1.jar时遇到的错

Posted polestar

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ant重新编译打包hadoop-core-1.2.1.jar时遇到的错相关的知识,希望对你有一定的参考价值。

错误1.
[[email protected] hadoop]# ant -Dversion=1.2.1  examples
错误: 找不到或无法加载主类 org.apache.tools.ant.launch.Launcher

解决方案
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:/usr/share/ant/lib/ant-launcher.jar


错误2:
BUILD FAILED
/usr/local/hadoop/build.xml:634: Execute failed: java.io.IOException: Cannot run program "autoreconf" (in directory "/usr/local/hadoop/src/native"): error=2, 没有那个文件或目录

安装包:
[[email protected] native]# yum -y install autoconf



错误3:
create-native-configure:
     [exec] Can‘t exec "aclocal": 没有那个文件或目录 at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
     [exec] autoreconf: failed to run aclocal: 没有那个文件或目录

安装包:
[[email protected] hadoop]# yum -y install automake


错误4:
     [exec] configure.ac:48: error: possibly undefined macro: AC_PROG_LIBTOOL
     [exec]       If this token and others are legitimate, please use m4_pattern_allow.
     [exec]       See the Autoconf documentation.
     [exec] autoreconf: /usr/bin/autoconf failed with exit status: 1

安装包
[[email protected] hadoop]# yum -y intall  libtool 

 

以上是关于ant重新编译打包hadoop-core-1.2.1.jar时遇到的错的主要内容,如果未能解决你的问题,请参考以下文章

Eclipce结合Ant进行编译打包传输运行

Ant默认配置文件不是build.xml该如何编写命令进行编译打包

Ant编译-运行-打包-删除基本JAVA项目

ant的原理

JAVA中ant脚本是啥东西?

如何写ant的打包命令