系统配置
Linux:CentOS-6.9-x86_64
Java:java version "1.7.0_80" 64-Bit
Hadoop:hadoop-2.6.0-cdh5.6.0
解决方式:
下载 64 位的 lib 包:http://dl.bintray.com/sequenceiq/sequenceiq-bin/:hadoop-native-64-2.6.0.tar
cd ${HADOOP_HOME}/lib/
tar -xvf hadoop-native-64-2.6.0.tar -C ./
解压到 HADOOP_HOME 的 lib 目录下;(注意:是 HADOOP_HOME 的 lib 目录,而不是 该 lib 下的 native 目录。)
vim ~/.bashrc
export HADOOP_COMMON_LIB_NATIVE_DIR=${HADOOP_HOME}/lib/native
export HADOOP_OPTS="-Djava.library.path=${HADOOP_HOME}/lib"
source ~/.bashrc
之后,再无警告信息出现了!
转载自:
解决Unable to load native-hadoop library for your platform
https://blog.csdn.net/succeedloveaaaa/article/details/48596857