2019独角兽企业重金招聘Python工程师标准>>>

http://devsolvd.com/questions/hadoop-unable-to-load-native-hadoop-library-for-your-platform-error-on-centos

The answer depends... 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/18 18:59:23 WARN util.NativeCodeLoader: Unable to load native-hadoop    library for your platform... using builtin-java classes where applicable

So, off to here to see what it does:

http://grepcode.com/file/repo1.maven.org/maven2/com.ning/metrics.action/0.2.6/org/apache/hadoop/util/NativeCodeLoader.java/

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:

log4j.logger.org.apache.hadoop.util.NativeCodeLoader=DEBUG

Then I ran a command that generates the original warning, like stop-dfs.sh, and got this goodie:

15/06/18 19: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:

[hadoop@VMWHADTEST01 hadoop]$ ldd --versionldd (GNU libc) 2.12

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.

log4j.logger.org.apache.hadoop.util.NativeCodeLoader=ERROR

I hope this helps others see that a big benefit of open source software is that you can figure this stuff out if you take some simple logical steps.

转载于:https://my.oschina.net/swuly302/blog/515853

Hadoop “Unable to load native-hadoop library for y相关推荐

  1. 【Hadoop】解决Hadoop Unable to load native-hadoop library问题

    1.启动Hadoop提示WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform- usin ...

  2. 运行hadoop指令之——WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform....

    每天都会遇到新的问题,每件事他没有唯一的解决方法,善于发现问题,善于解决问题,这是你走向成功的一门法宝,与其在问题困扰上纠结,还不如去尝试解决的方法,, ----------送给正在寻找答案的你 今天 ...

  3. hadoop fs -ls / 出现WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform

    Hadoop fs -ls / 出现WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform ...

  4. 解决Hadoop运行时的WARN util. NativeCodeLoader: Unable to load native-hadoop library for your platform

    每次运行hdfs命令时,都会出现下图的警告: 问题:每次运行hdfs命令时,都会出现下图的警告: WARN util. NativeCodeLoader: Unable to load native- ...

  5. [已解决]hadoop报错: WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platfor

    环境 宿主机:Windows 10 64_bit 虚拟机:VMware pro 12 CentOS 7.5 64_bit(3台:1个master.2个slave) Hadoop-2.6.5 ssh工具 ...

  6. Unable to load the Wrapper's native library because none of the following files及解决方法

    在有几个应用中,在启动的时候发现下列警告: The version of the script (3.5.29) doesn't match the version of this Wrapper ( ...

  7. Hama笔记:Unable to load native-hadoop library 和 Snappy native library not loaded 的解决

    Hama日志中总会看到这两句话: 13/05/03 11:58:57 WARN util.NativeCodeLoader: Unable to load native-hadoop library ...

  8. java jna java.lang.UnsatisfiedLinkError: Unable to load library Native library (win32-x86-64/C:\User

    背景 在新装的win系统下,java项目人脸识别项目要调用动态库,下面就说说问题 问题 Exception in thread "main" java.lang.Unsatisfi ...

  9. Unable to load library ‘c:\dcrf32.dll‘:Native library (win32-x86-64/c:\dcrf32.dll) not found

    报错信息Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: Unable to load ...

最新文章

  1. DebootstrapChroot
  2. sqlserver循环like变量_numba从入门到精通(6)—numba与循环与并行
  3. couchbase_Spring Data Couchbase 1.0 GA发布
  4. GetAdaptersInfo获取MAC地址
  5. java 异步查询转同步多种实现方式:循环等待,CountDownLatch,Spring EventListener,超时处理和空循环性能优化...
  6. UITapGestureRecognizer 的用法
  7. cNoteSetColor_命令窗口颜色设置
  8. 51单片机c语言教程第二章,51单片机C语言教程-郭天祥-PDF转word版第二章.docx
  9. ftdi+usb转串口驱动+android,FTDI usb转串口驱动
  10. 供应链业务架构设计概览
  11. 华为云服务权限在哪_华为云服务器如何开启密码登录Linux
  12. 01背包问题——大背包:
  13. 利用window的CLSID可以干的一些事情
  14. 第一章:costmap_2d代价地图生成原理
  15. esp8266学习感悟
  16. c语言开发exporter,cadvisor node-exporter引发的容器文件系统泄漏
  17. PADS PCB中的中英文对照 解决英文看不懂的尴尬
  18. docker-compose docker容器编排插件
  19. 斗地主小游戏(JAVA实现)
  20. 自定义Windows 10开始菜单的10种方法

热门文章

  1. PacificA 一致性协议解读
  2. Javascript跨域后台设置拦截
  3. maven导入多模块项目
  4. 超强1000个jquery极品插件!(连载中。。。。最近更新20090710)
  5. 基于Struts2.3.x+Spring3.2.x+Hibernate4.2.x+EasyUI1.3.4+Maven架构的示例程序
  6. 使用Chrome浏览器和FF浏览器查看ajax发送以及从服务器传回的数据
  7. 索引和长度必须引用该字符串内的位置--ArgumentOutOfRangeException
  8. git cherry-pick 使用
  9. 应用Spark解决Kaggle数据科学问题
  10. Redis配置不当可导致服务器被控制,已有多个网站受到影响 #通用程序安全预警#...