Hadoop 2.0 native lib build failed, Hadoop 2.0 本地库编译失败
2012-10-31 11:26
316 查看
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
编译hadoop本地库出现问题,报错
找了好长时间最后终于找到解决方法。
Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 02:44:56-0600)
Maven home: /usr/local/apache-maven-3.0.4
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>
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
---------------------------------------
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 goal org.codehaus.mojo:native-maven-plugin:1.0-alpha-7:javah (default) on project hadoop-common: Error running javah command: Error executing command line
找了好长时间最后终于找到解决方法。
Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 02:44:56-0600)
Maven home: /usr/local/apache-maven-3.0.4
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>
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
相关文章推荐
- React Native编译错误:ReactAndroid:buildReactNdkLib FAILED
- React Native编译错误:ReactAndroid:buildReactNdkLib FAILED
- fuse挂载hadoop2.0.0文件系统hdfs到本地(关于libhdfs和fuse-dfs的编译)
- Failed to load native-hadoop本地库不一致的解决办法
- hadoop2.X本地库编译问题INFO util.NativeCodeLoader - Unable to load native-hadoop library for your platform.
- gem安装ruby包无法建立本地环境(failed to build gem native extension)
- 自己动手一步一步安装hadoop(含编译hadoop的native本地包)
- Failed to load native-hadoop本地库不一致的解决办法
- Caffe编译出现:Makefile:603: recipe for target '.build_release/lib/libcaffe-nv.so.0.16.6' failed
- 自己动手一步一步安装hadoop(含编译hadoop的native本地包)
- caffe编译出现:Makefile:657: recipe for target '.build_release/tools/convert_imageset.bin' failed
- centos编译hadoop2.7.2 本地库
- hadoop ant编译libhdfs代码
- maven依赖本地非repository中的jar包-依赖jar包放在WEB-INF/lib等目录下的情况客户端编译出错的处理 maven找不到符号
- Error installing mysql2: ERROR: Failed to build gem native extension
- Failed to build gem native extension
- 本地运行hadoop-Failed to locate the winutils binary in the hadoop binary path
- Failed to build gem native extension
- 编译hadoop2.0(0.23.0)及运行的一些问题
- hadoop 2.0.0 fuse 安装 libhdfs fuse-dfs 编译