Baper
Baper

Reputation: 1543

javaerror while installing the hive

I want to install Hive and hadoop on my ubuntu.I followed this article all of things seems good but the end step when I write this command an error about Java appear like this:

/home/babak/Downloads/hadoop/bin/../bin hadoop: row 258:/usr/lib/j2sdk1.5-sun/bin/java: file or Folder not found

what should i do to solve this problem?

Upvotes: 0

Views: 143

Answers (2)

Mark Grover
Mark Grover

Reputation: 4080

Hadoop requires Java version 1.6 or higher. It seems like hadoop is looking for Java 1.5. Also, make sure the variable HADOOP_HOME is set in file /conf/hadoop-env.sh

I have a line like the following in mine:

export JAVA_HOME=/usr/lib/jvm/java-6-sun/

Upvotes: 0

Chris White
Chris White

Reputation: 30089

You need to find where on your machine java is installed:

which java

and then from there follow any symlinks or wrapper scripts to the actual location of the java executable.

An easier way to do this is to run the file indexer and then locate the file (here i use the jps executable, which is in the same folder as java:

#> sudo updatedb
#> locate jps

Whatever you get back, trim off the bin/jps suffix, and that's your JAVA_HOME value. If you can't find the executable, than you'll need to install java

Upvotes: 1

Related Questions