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

启用hive时报以下错误:

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


解决方法:

[ work@hadoop1 ~]$ cd ~/hive/conf/
[ work@hadoop1 ~]$ cp hive-env.sh.template hive-env.sh
在hive-env.sh文件里加下面的内容:
[work@hadoop1 conf]$ vi hive-env.sh
export HADOOP_HOME=/home/work/hadoop/hadoop-2.6.0/                                                                                                                   
[work@hadoop1 conf]$ source hive-env.sh
OK,问题解决

你可能感兴趣的:(Hive)