Hadoop 2.0 native lib build failed, Hadoop 2.0 本地库编译失败
来源:互联网 发布:c语言求圆的面积 编辑:程序博客网 时间:2024/05/21 09:17
Trevor Robinson created HADOOP-8370:
---------------------------------------
Summary: Native build failure: javah: class file for org.apache.hadoop.classification.InterfaceAudience not found
Key: HADOOP-8370
URL: https://issues.apache.org/jira/browse/HADOOP-8370
Project: Hadoop Common
Issue Type: Bug
Components: native
Affects Versions: 0.23.1
Java version: 1.7.0_04, vendor: Oracle Corporation
Java home: /usr/lib/jvm/jdk1.7.0_04/jre
Default locale: en_US, platform encoding: ISO-8859-1
OS name: "linux", version: "3.2.0-24-generic", arch: "amd64", family: "unix"
Reporter: Trevor Robinson
[INFO] --- native-maven-plugin:1.0-alpha-7:javah (default) @ hadoop-common ---
[INFO] /bin/sh -c cd /build/hadoop-common/hadoop-common-project/hadoop-common && /usr/lib/jvm/jdk1.7.0_02/bin/javah -d /build/hadoop-common/hadoop-common-project/hadoop-common/target/native/javah -classpath <...> org.apache.hadoop.io.compress.zlib.ZlibDecompressor org.apache.hadoop.security.JniBasedUnixGroupsMapping org.apache.hadoop.io.nativeio.NativeIO org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping org.apache.hadoop.io.compress.snappy.SnappyCompressor org.apache.hadoop.io.compress.snappy.SnappyDecompressor org.apache.hadoop.io.compress.lz4.Lz4Compressor org.apache.hadoop.io.compress.lz4.Lz4Decompressor org.apache.hadoop.util.NativeCrc32
Cannot find annotation method 'value()' in type 'org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate': class file for org.apache.hadoop.classification.InterfaceAudience not found
Cannot find annotation method 'value()' in type 'org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate'
Error: cannot access org.apache.hadoop.classification.InterfaceStability
class file for org.apache.hadoop.classification.InterfaceStability not found
The fix for me was to changing the scope of hadoop-annotations from
"provided" to "compile" in pom.xml:
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-annotations</artifactId>
<scope>compile</scope>
</dependency>
---------------------------------------
Summary: Native build failure: javah: class file for org.apache.hadoop.classification.InterfaceAudience not found
Key: HADOOP-8370
URL: https://issues.apache.org/jira/browse/HADOOP-8370
Project: Hadoop Common
Issue Type: Bug
Components: native
Affects Versions: 0.23.1
编译hadoop本地库出现问题,报错
Failed to execute goalorg.codehaus.mojo:native-maven-plugin:1.0-alpha-7:javah (default) onproject hadoop-common: Error running javah command: Error executing commandline找了好长时间最后终于找到解决方法。
Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 02:44:56-0600)
Maven home: /usr/local/apache-maven-3.0.4Java version: 1.7.0_04, vendor: Oracle Corporation
Java home: /usr/lib/jvm/jdk1.7.0_04/jre
Default locale: en_US, platform encoding: ISO-8859-1
OS name: "linux", version: "3.2.0-24-generic", arch: "amd64", family: "unix"
Reporter: Trevor Robinson
[INFO] --- native-maven-plugin:1.0-alpha-7:javah (default) @ hadoop-common ---
[INFO] /bin/sh -c cd /build/hadoop-common/hadoop-common-project/hadoop-common && /usr/lib/jvm/jdk1.7.0_02/bin/javah -d /build/hadoop-common/hadoop-common-project/hadoop-common/target/native/javah -classpath <...> org.apache.hadoop.io.compress.zlib.ZlibDecompressor org.apache.hadoop.security.JniBasedUnixGroupsMapping org.apache.hadoop.io.nativeio.NativeIO org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping org.apache.hadoop.io.compress.snappy.SnappyCompressor org.apache.hadoop.io.compress.snappy.SnappyDecompressor org.apache.hadoop.io.compress.lz4.Lz4Compressor org.apache.hadoop.io.compress.lz4.Lz4Decompressor org.apache.hadoop.util.NativeCrc32
Cannot find annotation method 'value()' in type 'org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate': class file for org.apache.hadoop.classification.InterfaceAudience not found
Cannot find annotation method 'value()' in type 'org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate'
Error: cannot access org.apache.hadoop.classification.InterfaceStability
class file for org.apache.hadoop.classification.InterfaceStability not found
The fix for me was to changing the scope of hadoop-annotations from
"provided" to "compile" in pom.xml:
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-annotations</artifactId>
<scope>compile</scope>
</dependency>
For some reason, it was the only dependency with scope "provided".
解决方法:
vi ./hadoop-common-project/hadoop-auth/pom.xml
vi ./hadoop-common-project/hadoop-common/pom.xml
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-annotations</artifactId>
<scope>compile</scope>
</dependency>
将节点hadoop-annotations的值由provide 改成compile
- Hadoop 2.0 native lib build failed, Hadoop 2.0 本地库编译失败
- Failed to load native-hadoop本地库不一致的解决办法
- Failed to load native-hadoop本地库不一致的解决办法
- hadoop native lib install
- hadoop lib native
- Hadoop-编译本地库
- BUILD HADOOP NATIVE LIBRARIES
- 编译Hadoop-2.0.3的native
- hadoop初识之五:hadoop启动方式、机器上必须的配置、本地native库配置、及hadoop编译
- Hadoop installation. Build native library
- hadoop native本地库问题总结
- 【hadoop】Hadoop的本地库(Native Libraries)介绍
- hadoop 编译native包
- 自己动手一步一步安装hadoop(含编译hadoop的native本地包)
- native-hadoop library本地库不一致解决: WARN util.NativeCodeLoader: Unable to load native-hadoop library
- Installation. Hadoop 2.2.0 build native code
- Hadoop-2.2.0在Unbuntu ADM64中需要重新编译Native Lib
- HADOOP的本地库(NATIVE LIBRARIES)介绍
- windows Office 界面改进
- Epic Games CEO,《无尽之剑》创始人Tim Sweeney:下一代智能手机和平板电脑的游戏趋势
- mysql 函数
- JAVA中的server和client基本连接
- windows office 界面改进(续)
- Hadoop 2.0 native lib build failed, Hadoop 2.0 本地库编译失败
- Apache MiNa 实现多人聊天室
- Linux下安装mongodb
- windows 8 office 应用商店
- 关于DLNA的资料汇总(更新部分支持影音设备)
- Java&Android的线程池---ExecutorService
- Retrospect on a recent university project
- 支持的代理模式异步下载httpdownload
- Java与C之间通过JNI传递中文字符串