Missing Hive Execution Jar: /usr/local/hadoop/hive

2019-03-01 18:12发布

I have Hadoop 1.0.4 running on a single node cluster set up on my Ubuntu machine.

I did the following steps to download and install the hive release

> svn co http://svn.apache.org/repos/asf/hive/trunk hive    
> cd hive

My hadoop install folder is $HADOOP_HOME/hive and $HADOOP_HOME=/usr/local/hadoop. I set both the environment variables in .bashrc under /home/hduser which is my Hadoop user and the $JAVA_HOME as well.

export HADOOP_HOME=/usr/local/hadoop

export HIVE_HOME=$HADOOP_HOME/hive

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

I have also added the bin folder of both hadoop and hive in my $PATH variable as follows

export PATH=$PATH:$HADOOP_HOME/bin    
export PATH=$HIVE_HOME/bin:$PATH

But while running hive from CLI, I am getting the below error.

hduser@somnath-laptop:/usr/local/hadoop/hive$ bin/hive    
Missing Hive Execution Jar: /usr/local/hadoop/hive/lib/hive-exec-*.jar

Should I download this jar and add it to the /lib/ or is there some hive-specific environment variables that I need to configure. Any suggestion would be very helpful.

11条回答
ゆ 、 Hurt°
2楼-- · 2019-03-01 18:26

In my case, a simple reboot helped after setting the PATH variable.

查看更多
走好不送
3楼-- · 2019-03-01 18:27

Just find your hive-exec-*.jar folder and create a symbolic link to it.

in my case, first i go to hive folder using "cd /usr/local/Cellar/hive/1.2.1"

and then run command "ln -s libexec/lib/ lib"

查看更多
\"骚年 ilove
4楼-- · 2019-03-01 18:33

Here is another post for what worked for me in 2017.

This issue happened to me because of the way I (a beginner) extracted the Hive tar file. I downloaded "hive-2.3.0" from us.apache.org and extracted the file to /usr/local/hive. The jar was expected to be in /usr/local/hive/lib but for some reasons it was in /usr/local/hive**/bin/**lib. In other words, there was an extra "/bin" directory under /hive which contained all of the files that should have been directly under /hive. I fixed this problem by renaming the extra /bin directory to "/bin2," moving all the files from within /bin2 to the main /hive directory, and removing the unnecessary and now empty /bin2 directory. Once the .jar file was in the correct directory, there were no problems running Hive! Here are the commands I used:

    cd /usr/local
    mv hive/bin hive/bin2
    mv hive/bin2/* hive
    rm -r hive/bin2
查看更多
冷血范
5楼-- · 2019-03-01 18:36

Try this :

export HIVE_HOME=$HADOOP_HOME/hive/build/dist
export PATH=$HIVE_HOME/bin:$PATH
查看更多
Rolldiameter
6楼-- · 2019-03-01 18:39

The tar file apache-hive-0.13.1-src.tar.gz has a missing lib folder You can download hive-0.12.0.tar.gz and move the lib folder to apache-hive-0.13.1-src folder. Now hive should be working.

查看更多
女痞
7楼-- · 2019-03-01 18:39

I did below in Dec 2017 and it worked.

  1. Copied hive in to hadoop_home directory
  2. Did below in cygwin:

    export HIVE_HOME=$HADOOP_HOME/hive
    export PATH=$HIVE_HOME/bin:$PATH
    
查看更多
登录 后发表回答