Hadoop警告消息:'execstack -c< libfile>',或使用'-z noexecstack'链接它

oalqel3c  于 2023-01-29  发布在  Hadoop
关注(0)|答案(3)|浏览(487)

我是hadoop的新手,已经在centos box上安装了hadoop 2. 2. 0。对于我运行的任何hdfs命令,下面提到的都是我得到的警告消息。任何帮助都将不胜感激。

Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /data/hadoop-2.2.0/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
14/02/25 11:52:45 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable.

JAVA_HOME设置为oracle热点jdk1.7

u91tlkcl

u91tlkcl1#

可以得到一些答案,centos运行在64位版本和hadoop默认安装是32位。所以要么需要编译的centos或忽略相同的。

idfiyjo8

idfiyjo82#

export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native 
export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib"

将这两行代码添加到.bashrc中,重新打开终端并尝试重新启动hadoop。

cbeh67ev

cbeh67ev3#

execstack -c <libfile>,或者用-z noexecstack链接它。如果你得到这个错误意味着简单地通过sudo gedit .bashrc打开./bashrc并添加这两行:

export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native 
export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib"

更新.bashrc文件的下一步:

source .bashrc

最后:

./start-all.sh

完成了。现在一切正常。

相关问题