启用hive时报以下错误:Cannot find hadoop installation: $HADOOP_HOME or $HADOOP_PREFIX must be set or hadoop m

启用hive时报以下错误:Cannot find hadoop installation: $HADOOP_HOME or $HADOOP_PREFIX must be set or hadoop must be in the path

解决方法:

[admin1@hadoop1 ~]$ cd ~/hive/conf/
[admin1@hadoop1 ~]$ cp hive-env.sh.template hive-env.sh

在hive-env.sh文件里加下面的内容:

[admin1@hadoop1 conf]$ vi hive-env.sh
export HADOOP_HOME=/home/hadoop/apps/hadoop-2.7.2                                                                                                                 
[admin1@hadoop1 conf]$ source hive-env.sh

你可能感兴趣的:(Hive安装问题,报错)