on typing java -version it is giving below error bash: /usr/bin/java: cannot execute binary file: Exec format error
I dont know what to do I want to install hadoop but I am unable to complete java installation
on typing java -version it is giving below error bash: /usr/bin/java: cannot execute binary file: Exec format error
I dont know what to do I want to install hadoop but I am unable to complete java installation
That error generally means that the java package you have is not right type for your system. Typically this happens when a system of x86 tries to read x64-based files.
Seems some issue with your OpenJDK(default jdk) that comes with ubuntu. I have hadoop 2 installed - single node cluster on my ubuntu box. You can follow these steps to install Oracle Java 8 which is compatible with Hadoop2(MRv2). Open terminal(Ctrl+Alt+T)
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
then verify
java -version
and then setup env variables
sudo apt-get install oracle-java8-set-default
And if you want you can refer to my blog about setting up Hadoop(MRv1 or MRv2) which contains pointers to some good blogs also.