Hadoop “Unable To Load Native-Hadoop Library For Your Platform” Warning

761    Asked by alexGONZALEZ in Big Data Hadoop , Asked on Nov 18, 2022

 I installed Hadoop on the server running CentOs. As I run start-dfs.shor stop-dfs.sh I got the following error :


WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

I am using the Hadoop 2.2.0 Version. In hadoop-env.sh I have also added these two environment variables.  


export HADOOP_OPTS="$HADOOP_OPTS -Djava.library.path=/usr/local/hadoop/lib/"
export HADOOP_COMMON_LIB_NATIVE_DIR="/usr/local/hadoop/lib/native/"
Getting the error “unable to load native hadoop library for your platform”.

Any solution to what I have to do?

Answered by Al German
  As you are unable to load native hadoop libraries for your platform, I assume you're running Hadoop on 64bit CentOS. The reason you saw that warning is the native Hadoop library $HADOOP_HOME/lib/native/libhadoop.so.1.0.0 was actually compiled on 32 bit.

  • Anyway, it's just a warning, and won't impact Hadoop's functionalities.
  • Here is the way if you do want to eliminate this warning, download the source code of Hadoop and recompile libhadoop.so.1.0.0 on a 64bit system, then replace the 32bit one.
  • Steps on how to recompile source code are included here for Ubuntu:
  • http://www.ercoppa.org/Linux-Compile-Hadoop-220-fix-Unable-to-load-native-hadoop-library.htm



Your Answer

Interviews

Parent Categories