Hadoop “Unable to load native-hadoop library for your platform” warning

后端 未结 21 1120
礼貌的吻别
礼貌的吻别 2020-11-22 03:48

I\'m currently configuring hadoop on a server running CentOs. When I run start-dfs.sh or stop-dfs.sh, I get the following error:

21条回答
  •  逝去的感伤
    2020-11-22 04:01

    Verified remedy from earlier postings:

    1) Checked that the libhadoop.so.1.0.0 shipped with the Hadoop distribution was compiled for my machine architecture, which is x86_64:

    [nova]:file /opt/hadoop-2.6.0/lib/native/libhadoop.so.1.0.0
    /opt/hadoop-2.6.0/lib/native/libhadoop.so.1.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=3a80422c78d708c9a1666c1a8edd23676ed77dbb, not stripped
    

    2) Added -Djava.library.path= to HADOOP_OPT in hadoop-env.sh:

    export HADOOP_OPTS="$HADOOP_OPTS -Djava.net.preferIPv4Stack=true -Djava.library.path=/opt/hadoop-2.6.0/lib/native"
    

    This indeed made the annoying warning disappear.

提交回复
热议问题