这些问题是2013年初整理的,不过到目前为止,即使最新的hadoop2.0系列,编译总体上变化不大,因此还能适用。
执行命令: mvn package -Pdist,native -DskipTests -Dtar
 
1. [ERROR] Failed to execute goal org.codehaus.mojo:make-maven-plugin:1.0-beta-1:autoreconf (compile) on project hadoop-common: autoreconf command returned an exit value != 0. Aborting build; see debug output for more information. -> [Help 1]
原因: 未安装autotool
解决方法:  sudo apt-get install autocong
                sudo apt-get install automake
                sudo apt-get install libtool
 
2. [ERROR] Failed to execute goal org.codehaus.mojo:make-maven-plugin:1.0-beta-1:configure (compile) on project hadoop-common: ./configure returned an exit value != 0. Aborting build; see command output above for more information. -> [Help 1]
原因: configure: error: Native java headers not found. Is $JAVA_HOME set correctly?
解决方法: ubuntu已安装的为open jdk, 需要sun的jdk, 从虚拟机复制下来, 然后指定JAVA_HOME
  jdk的安装: 下载 http://www.oracle.com/technetwork/java/javase/downloads/index.html
                  chmod +x jdk-6u43-linux-i586.bin
                  ./jdk-6u43-linux-i586.bin
 
3. [INFO] configure: error: Zlib headers were not found... native-hadoop library needs zlib to build. Please install the requisite zlib development package.
原因: 未安装zlibc
解决方法: 安装 sudo apt-get install --reinstall zlibc zlib1g zlib1g-dev
 
4. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (make) on project hadoop-pipes: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "cmake" (in directory "/home/yuling.sh/trunk/hadoop-tools/hadoop-pipes/target/native"): java.io.IOException: error=2, No such file or directory -> [Help 1]
解决方法: sudo apt-get install cmake
 
5.  [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (generate-sources) on project hadoop-yarn-api: Command execution failed. Cannot run program "protoc" (in directory "/home/ads/build25_5u4_x64/workspace/t_dp_hadoop2/t_dp_hadoop2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api"): java.io.IOException: error=2, No such file or directory -> [Help 1]
机器上未安装protobuf导致
6.     [exec] -- Configuring incomplete, errors occurred!
    [exec] CMake Error at /usr/share/cmake/Modules/FindOpenSSL.cmake:66 (MESSAGE):
    [exec]  Could NOT find OpenSSL
    [exec] Call Stack (most recent call first):
    [exec]  CMakeLists.txt:20 (find_package)
  本机出错,  虚拟机上编译成功
The OpenSSL library is usually already installed, but you have to install the header files. Depending on your Linux distribution, you'll need these packages:
 
    Red Hat, Fedora, CentOS - openssl-devel  http://rpm.corp.taobao.com/find.php?q=openssl-devel+++++&t=yum&d=0
    Debian, Ubuntu - libssl-dev   sudo apt-get install libssl-dev
    Arch - openssl
 
7. native的编译问题, 应该在运行的环境下编译, 然后打jar包.
  1.0环境下是使用已有的native包

Hadoop 2.0 编译问题小结的更多相关文章

  1. [Hadoop] - Hadoop3.0.x编译

    这里仅介绍一种Hadoop3.0.x版本的源码编译方式 编译过程 1. 下载源码 2. 安装依赖环境 3. 源码编译 ========================================= ...

  2. hadoop2.1.0编译安装教程

    由于现在hadoop2.0还处于beta版本,在apache官方网站上发布的beta版本中只有编译好的32bit可用,如果你直接下载安装在64bit的linux系统的机器上,运行会报一个INFO ut ...

  3. hadoop2.1.0和hadoop2.2.0编译安装教程

    由于现在hadoop2.0还处于beta版本,在apache官方网站上发布的beta版本中只有编译好的32bit可用,如果你直接下载安装在64bit的linux系统的机器上,运行会报一个INFO ut ...

  4. Spark2.0编译

    Spark2.0编译 1 前言 Spark2.0正式版于今天正式发布,本文基于CDH5.0.2的Spark编译. 2 编译步骤 #2.1 下载源码 wget https://github.com/ap ...

  5. Hadoop 3.0 安装

    1.      下载Hadoop 3.0 http://mirrors.tuna.tsinghua.edu.cn/apache/hadoop/common/hadoop-3.0.0/hadoop-3. ...

  6. hadoop 源码编译

    hadoop 源码编译 1.准备jar 1) hadoop-2.7.2-src.tar.gz 2) jdk-8u144-linux-x64.tar.gz 3) apach-ant-1.9.9-bin. ...

  7. CentOS 7.0编译安装Nginx1.6.0+MySQL5.6.19+PHP5.5.14

    准备篇: CentOS 7.0系统安装配置图解教程 http://www.osyunwei.com/archives/7829.html 一.配置防火墙,开启80端口.3306端口 CentOS 7. ...

  8. centos 7.0 编译安装php 7.0.3

    php下载页面 http://cn2.php.net/downloads.php 7.0.3多地区下载页面 http://cn2.php.net/get/php-7.0.3.tar.gz/from/a ...

  9. Valgrind 3.11.0编译安装

    Valgrind 3.11.0编译安装 Valgrind是一款用于内存调试.内存泄漏检测以及性能分析的软件开发工具. Valgrind遵守GNU通用公共许可证条款,是一款自由软件. 到3.3.0版本为 ...

随机推荐

  1. Selenium IDE 基础使用教程

    Selenium IDE 基础使用教程 简介及安装 Selenium IDE 是一个易于使用的Firefox插件.它提供了一个图形用户界面,可进行脚本录制及导出.其记录的脚本可以被转换成多种编程语言( ...

  2. codeforces#277.5 C. Given Length and Sum of Digits

    C. Given Length and Sum of Digits... time limit per test 1 second memory limit per test 256 megabyte ...

  3. longest-repeating-character-replacement(难)

    用sliding window的方法,之前还有个k不同元素好像也是类似的思路.有时间可以去复习下. https://leetcode.com/problems/longest-repeating-ch ...

  4. XSS攻击过滤函数

    黑客用XSS攻击有多种方式,PHP的内置函数不能应对各种各样的XSS攻击.因此,使用filter_var,mysql_real_escape_string,htmlentities,htmlspeci ...

  5. HashMap、LinkedHashMap和TreeMap对比

    共同点: HashMap,LinkedHashMap,TreeMap都属于Map:Map 主要用于存储键(key)值(value)对,根据键得到值,因此键不允许键重复,但允许值重复. 不同点: 1.H ...

  6. 深度增强学习--A3C

    A3C 它会创建多个并行的环境, 让多个拥有副结构的 agent 同时在这些并行环境上更新主结构中的参数. 并行中的 agent 们互不干扰, 而主结构的参数更新受到副结构提交更新的不连续性干扰, 所 ...

  7. MySql 建库建表脚本

    1.建库 CREATE DATABASE test DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; 2.建表脚本 CREATE TABLE `c ...

  8. ArrayList源码深度解析

    jdk:1.8 一.先看看ArrayList类的整体概述, ArraList是基于动态数组实现的一种线性列表,这种基于动态数组的好处就是索引比较快,时间复杂度为O(1):但是对数据修改比较慢,因为需要 ...

  9. 【笔记】js原生方法 在元素外部或内部实现添加元素功能(类似jq 的 insert 和 append)

    介绍的这个方法是:insetAdjacentHTML() 方法 此方法接收两个参数: 第一个参数必为下列值: beforebegin:在调用的元素外部的前面添加一个目标元素 afterend:在调用元 ...

  10. Tomcat的server.xml配置讲解(一)

    一.Tomcat虚拟目录的配置 1.服务器配置 默认端口号为8080,如果要想修改端口号,则可以在Tomcat目录中的conf/server.xml文件,找到如下代码,将端口号改为:80:保存serv ...