I'm having trouble configuring the Hadoop environment. I'm doing a zero installation on a CentOS 6.7 machine.
When attempting to execute any hadoop command, such as:
hdfs namenode -format
hadoop claspath
hadoop version
I get the error message:
Error: Could not 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>
HADOOP variables
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
Hadoop Path
[hadoop@node1 hadoop]$ pwd
/home/hadoop/install/hadoop-2.7.1/etc/hadoop