CentOS 编译hadoop 1.0.4

本文介绍了Hadoop的编译过程及常见问题解决方案,包括Ant安装、编译警告排除、依赖包安装等,并指导如何正确部署到集群。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. 安装ant

从http://ant.apache.org/下载最新的ant,将其解压缩,然后安装README所述的方法即可完成安装


2. 在hadoop目录下,执行ant -file build.xml进行编译,提示:

compile-rcc-compiler:
    [javac] /home/hadoop-1.0.4/build.xml:463: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds


compile-core-classes:
    [javac] /home/hadoop-1.0.4/build.xml:487: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds


compile-hdfs-classes:
    [javac] /home/hadoop-1.0.4/build.xml:576: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 1 source file to /home/hadoop-1.0.4/build/classes


解决方法是进入build.xml文件,在相应的行加入:

includeantruntime="false"


3. 之后再执行ant -file build.xml,会提示:

create-native-configure:
     [exec] configure.ac:47: 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


解决方法:

yum install libtool


4. 编译后,要将hadoop/build目录下的内容拷贝到集群的各个结点上,否则在mp的过程中,会提示如下错误:

2014-03-04 17:11:22,593 ERROR org.apache.hadoop.mapred.TaskTracker: Shutting down. Incompatible buildVersion.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值