4.在hadoop根目录下执行ant开始编译:
ant
如果这一步编译出现下列错误提示信息:
BUILD FAILED/home/hadoop/hadoop-0.20.2/build.xml:1624: Class org.apache.tools.ant.taskdefs.ConditionTask doesn't support the nested "typefound" element.
这是因为ant版本太低,我用系统自带的ant 1.6.5 编译就出错了。到apache网站上下载个ant 1.8.0就可以了。
ant的安装很简单,直接解压到 /home/hadoop/ant ,然后在~/.bashrc配置下路径就可以了: