解决 Unable to load native-hadoop library for your platform
Posted chengjunde
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决 Unable to load native-hadoop library for your platform相关的知识,希望对你有一定的参考价值。
安装hadoop启动之后总有警告:Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
原因:
Apache提供的hadoop本地库是32位的,而在64位的服务器上就会有问题,因此需要自己编译64位的版本。
1、首先找到对应自己hadoop版本的64位的lib包,可以自己手动去编译,但比较麻烦,也可以去网上找,好多都有已经编译好了的。
2、可以去网站:http://dl.bintray.com/sequenceiq/sequenceiq-bin/ 下载对应的编译版本
3、将准备好的64位的lib包解压到已经安装好的hadoop安装目录的lib/native 和 lib目录下:
- [hadoop@hadoopTest ~]$ tar -xvf hadoop-native-64-2.7.0.tar -C hadoop-2.7.2/lib/native
- [hadoop@hadoopTest ~]$ tar -xvf hadoop-native-64-2.7.0.tar -C hadoop-2.7.2/lib
- [hadoop@hadoopTest hadoop-2.7.2]$ vi /etc/profile
- export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
- export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib"
- [hadoop@hadoopTest hadoop-2.7.2]$ source /etc/profile
7、自检hadoop checknative –a 指令检查
- <pre name="code" class="java">[hadoop@hadoopTest hadoop-2.7.2]$ hadoop checknative –a
以上是关于解决 Unable to load native-hadoop library for your platform的主要内容,如果未能解决你的问题,请参考以下文章
Unable to load native-hadoop library for your platform解决方法
解决 Unable to load native-hadoop library for your platform
react native中Unable to load script from assets 'index.android.bundle'解决方案
[React-Native] Unable to load script from assets 'index.android.bundle'.
Hadoop问题解决:WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... usi
Spark记录-spark报错Unable to load native-hadoop library for your platform