Reputation: 6690
I am new to Hadoop, setting up my environment for the first time ever in Ubuntu 18.10
I downloaded jdk-8u101-linux-i586.tar.gz
, jre-8u101-linux-i586.tar.gz
and `hadoop-2.7.3.tar.gz and extracted them respectively with this command in my custom locations.
tar -xvf jdk-8u101-linux-i586.tar.gz
tar -xvf jre-8u101-linux-i586.tar.gz
tar -xvf hadoop-2.7.3.tar.gz
I then updated ~/.bashrc file by appending the following information using gedit
-
export HADOOP_HOME=/home/hduser/HadoopPOC/hadoop-2.7.3
export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
export HADOOP_MAPRED_HOME=$HADOOP_HOME
export HADOOP_COMMON_HOME=$HADOOP_HOME
export HADOOP_HDFS_HOME=$HADOOP_HOME
export YARN_HOME=$HADOOP_HOME
export PATH=$PATH:$HADOOP_HOME/bin
# Set JAVA_HOME
export JAVA_HOME=/home/hduser/HadoopPOC/JAVA/jdk1.8.0_101
export PATH=$JAVA_HOME/bin:$PATH
I then ran source .bashrc
command and then logged out of my account and logged back in.
But I cannot determine if Java and Hadoop have been properly installed. I get these errors-
hduser@hduser-HP-Pavilion-g7-Notebook-PC:~/HadoopPOC/JAVA/jdk1.8.0_101/bin$ java -version
bash: /home/hduser/HadoopPOC/JAVA/jdk1.8.0_101/bin/java: No such file or directory
hduser@hduser-HP-Pavilion-g7-Notebook-PC:~/HadoopPOC/JAVA/jdk1.8.0_101/bin$ hadoop version
/home/hduser/HadoopPOC/hadoop-2.7.3/bin/hadoop: line 166: /home/hduser/HadoopPOC/JAVA/jdk1.8.0_101/bin/java: No such file or directory
I did ls
on $JAVA_HOME/bin and noticed that java
exists.
Upvotes: 0
Views: 81
Reputation: 6690
I had installed a 32-bit java in a 64-bit machine, which is why it didn't work. Now I've installed a 64-bit jdk and it recognises java -version
Upvotes: 0
Reputation: 1774
Is the java command in /home/hadoopPOC/JAVA/jdk1.8.0_101/bin
?
Given the variables you specified above, that is where your system will look for it.
What does ls -l /home/hadoopPOC/JAVA/jdk1.8.0_101/bin
show you?
As you indicated in the Q&A, the paths were incorrect.
Re the new question, it has hard to tell without seeing the details. Probably it is a similar issue - the path specified (/home/hduser/HadoopPOC/JAVA/jdk1.8.0_101/bin/java
) does not exist.
Upvotes: 1