1
I’m having trouble setting up the Hadoop environment. I’m doing a zero installation on a Centos 6.7 machine.
When trying to execute any Hadoop command, for example:
hdfs namenode -format
hadoop claspath
hadoop version
I get the error message:
Error: Unable to find or load main class Djava.library.path=.home.Hadoop.install.Hadoop-2. 7.1.lib
Below my conf:
[hadoop@node1 hadoop]$ cat **hadoop-env.sh**
export JAVA_HOME=${JAVA_HOME}
export JAVA_HOME="/usr/lib/jvm/jdk1.8.0_101"
export HADOOP_OPTS="$HADOOP_OPTS ‐Djava.net.preferIPv4Stack=true"
export HADOOP_CONF_DIR="/hadoop‐2.7.1/etc/hadoop"
[hadoop@node1 hadoop]$ cat **core-site.xml**
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000/</value>
</property>
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/hadoop‐2.7.1/tmp</value>
</property>
</configuration>
Variables from the HADOOP
export HADOOP_INSTALL="/home/hadoop/install/hadoop-2.7.1"
export PATH=$PATH:$HADOOP_INSTALL/bin
export PATH=$PATH:$HADOOP_INSTALL/sbin
export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_HOME=$HADOOP_INSTALL
export HADOOP_HDFS_HOME=$HADOOP_INSTALL
export YARN_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_INSTALL/lib/native
export HADOOP_OPTS="‐Djava.library.path=$HADOOP_INSTALL/lib"
export LD_LIBRARY_PATH=$HADOOP_INSTALL/lib/native/:$LD_LIBRARY_PATH
export JAVA_HOME="/usr/lib/jvm/jdk1.8.0_101"
PATH=/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/lib/jvm/jdk1.8.0_101/bin:/usr/lib/jvm/jdk1.8.0_101:/usr/lib/jvm/jdk1.8.0_101:/home/hadoop/install/hadoop-2.7.1/bin:/home/hadoop/install/hadoop-2.7.1/sbin:/home/hadoop/install/hadoop-2.7.1/bin:/home/hadoop/install/hadoop-2.7.1/sbin:/home/hadoop/install/hadoop-2.7.1/bin:/home/hadoop/install/hadoop-2.7.1/sbin:/home/hadoop/install/hadoop-2.7.1/bin:/home/hadoop/install/hadoop-2.7.1/sbin:/home/hadoop/install/hadoop-2.7.1/bin:/home/hadoop/install/hadoop-2.7.1/sbin:/home/hadoop/install/hadoop-2.7.1/bin:/home/hadoop/install/hadoop-2.7.1/sbin:/home/hadoop/install/hadoop-2.7.1/bin:/home/hadoop/install/hadoop-2.7.1/sbin:/home/hadoop/install/hadoop-2.7.1/bin:/home/hadoop/install/hadoop-2.7.1/sbin
JAVA_HOME=/usr/lib/jvm/jdk1.8.0_101
Path of the Hadoop
[hadoop@node1 hadoop]$ pwd
/home/hadoop/install/hadoop-2.7.1/etc/hadoop
Bá, son. Give a little formatting on that question there, please.
– Jéf Bueno
I accidentally published.... I’m editing... sorry
– Brunão
Don’t apologize, it happens. I just wanted to give a real touch.
– Jéf Bueno