Home:ALL Converter>Issues with installing Hive on Ubuntu: $HADOOP_HOME or $HADOOP_PREFIX must be set or hadoop must be in the

Issues with installing Hive on Ubuntu: $HADOOP_HOME or $HADOOP_PREFIX must be set or hadoop must be in the

Ask Time:2016-03-17T02:50:15         Author:Maeve90

Json Formatter

I have installed Hadoop on my Ubuntu EC2 instance and have gone through all the steps for installing hive following this tutorial: http://www.tutorialspoint.com/hive/hive_installation.htm

However, when I go to launch hive I get the following error message:

"Cannot find hadoop installation: $HADOOP_HOME or $HADOOP_PREFIX must be set or hadoop must be in the path"

My bashrc file reads this:

export JAVA_HOME=/usr
export PATH=$PATH:$JAVA_HOME/bin
export HADOOP_HOME=/usr/local/hadoop-2.7.1
export PATH=$PATH:$HADOOP_HOME/bin/


export HADOOP_MAPRED_HOME=$HADOOP_HOME
export HADOOP_COMMON_HOME=$HADOOP_HOME
export HADOOP_HDFS_HOME=$HADOOP_HOME
export YARN_HOME=$HADOOP_HOME
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export PATH=$PATH:$HADOOP_HOME/sbin:$HADOOP_HOME/bin


export HIVE_HOME=/usr/local/hive
export PATH=$PATH:$HIVE_HOME/bin
export CLASSPATH=$CLASSPATH:/usr/local/hadoop-2.7.1/lib/*:.
export CLASSPATH=$CLASSPATH:/usr/local/hive/lib/*:.

export DERBY_HOME=/usr/local/derby
export PATH=$PATH:$DERBY_HOME/bin

Does anyone have any suggestions on how to fix this? I presume it's an issue with how I have linked my Hadoop and hive,

Thanks in advance,

Maeve

Author:Maeve90,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/36044498/issues-with-installing-hive-on-ubuntu-hadoop-home-or-hadoop-prefix-must-be-se
Nishu Tayal :

You need to add HADOOP_HOME in hive-config.sh file. \n\nuser@ubuntu:~$ cd /usr/local/hive/bin\nuser@ubuntu:~$ sudo gedit hive-config.sh\n\n\nGo to the line where following statements are written in file:\n\nHIVE_CONF_DIR=\"${HIVE_CONF_DIR:-$HIVE_HOME/conf\"\nexport HIVE_CONF_DIR=$HIVE_CONF_DIR\nexport HIVE_AUX_JARS_PATH=$HIVE_AUX_JARS_PATH\n\n\nBelow this write the following\n\nexport HADOOP_HOME=/usr/local/hadoop-2.7.1 \n",
2016-03-17T06:08:22
yy