I just installed Hadoop 2.6 from tarball on 64-bit CentOS 6.6. The Hadoop install did indeed come with a prebuilt 64-bit native library. For my install, it is here:
/opt/hadoop/lib/native/libhadoop.so.1.0.0
And I know it is 64-bit:
[hadoop@VMWHADTEST01 native]$ ldd libhadoop.so.1.0.0./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=>(0x00007fff43510000)
libdl.so.2=>/lib64/libdl.so.2(0x00007f9be553a000)
libc.so.6=>/lib64/libc.so.6(0x00007f9be51a5000)/lib64/ld-linux-x86-64.so.2(0x00007f9be5966000)
Unfortunately, I stupidly overlooked the answer right there staring me in the face as I was focuses on, “Is this library 32 pr 64 bit?”:
`GLIBC_2.14' not found (required by ./libhadoop.so.1.0.0)
So, lesson learned. Anyway, the rest at least led me to being able to suppress the warning. So I continued and did everything recommended in the other answers to provide the library path using the HADOOP_OPTS environment variable to no avail. So I looked at the source code. The module that generates the error tells you the hint (util.NativeCodeLoader):
15/06/1818:59:23 WARN util.NativeCodeLoader:Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Ah, there is some debug level logging – let’s turn that on a see if we get some additional help. This is done by adding the following line to $HADOOP_CONF_DIR/log4j.properties file:
Then I ran a command that generates the original warning, like stop-dfs.sh, and got this goodie:
15/06/1819:05:19 DEBUG util.NativeCodeLoader:Failed to load native-hadoop with error: java.lang.UnsatisfiedLinkError:/opt/hadoop/lib/native/libhadoop.so.1.0.0:/lib64/libc.so.6: version `GLIBC_2.14' not found (required by /opt/hadoop/lib/native/libhadoop.so.1.0.0)
And the answer is revealed in this snippet of the debug message (the same thing that the previous ldd command ‘tried’ to tell me:
`GLIBC_2.14' not found (required by opt/hadoop/lib/native/libhadoop.so.1.0.0)
What version of GLIBC do I have? Here’s simple trick to find out:
So, can’t update my OS to 2.14. Only solution is to build the native libraries from sources on my OS or suppress the warning and just ignore it for now. I opted to just suppress the annoying warning for now (but do plan to build from sources in the future) buy using the same logging options we used to get the debug message, except now, just make it ERROR level.
Hadoop “Unable to load native-hadoop library for your platform” warning
Archives
Categories
Recent Posts
Stopping and Removing Containers
29 May 2019Installing Amazon CLI and Terraform on Windows desktop
27 May 2019Convert DOS to UNIX and vice versa
25 May 2019Calendar