Reprint Please specify source: http://blog.csdn.net/l1028386804/article/details/51538611
The following warning message appears when you configure Hadoop to start:
WARN util. nativecodeloader:unable to load Native-hadoop library for your platform ... using Builtin-java classes where applicable
The question is where. Some people say that this is the pre-compiled Hadoop package is 32bit, running on the 64bit will be problematic. But most of the time the answer is wrong.
How do I verify the 64bit or 32bit?
Go to the Hadoop installation directory
/usr/local/hadoop-2.5.2/lib/native
View dependent libraries with the LDD command
LDD libhadoop.so.1.0.0
Will output the following information:
./libhadoop.so.1.0.0:/lib64/libc.so.6:version ' glibc_2.14 ' not found (required by./libhadoop.so.1.0.0)
Linux-vdso.so.1 = (0x00007fff369ff000)
libdl.so.2 =/lib64/libdl.so.2 (0x00007f3caa7ea000)
libc.so.6 =/lib64/libc.so.6 (0x00007f3caa455000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3caac1b000)
You can see that the dependencies are/lib64/dynamic libraries, so it's not a 64-bit/32-bit problem. But see error, glibc_2.14 can't find, now check the system GLIBC Library, LDD--version can check.
Enter the command:
LDD--version
Will output the following information:
LDD (GNU libc) 2.12
Copyright (C) Free Software Foundation, Inc.
This was free software; See the source for copying conditions. There is NO
warranty; even to merchantability or FITNESS for A particular PURPOSE.
Written by Roland McGrath and Ulrich drepper.
The original pre-installed GLIBC library is version 2.12, and Hadoop expects the 2.14 version, so print the warning message.
Now there are two ways to recompile the glibc.2.14 version, which is a bit dangerous to use for Hadoop after installation. The second method removes the alarm information directly in the log4j log. Add in the//usr/local/hadoop-2.5.2/etc/hadoop/log4j.properties file
Log4j.logger.org.apache.hadoop.util.nativecodeloader=error