初次启动hive,解决 ls: cannot access /home/hadoop/spark-2.2.0-bin-hadoop2.6/lib/spark-assembly-*.jar: No su
Posted 魏大宾
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了初次启动hive,解决 ls: cannot access /home/hadoop/spark-2.2.0-bin-hadoop2.6/lib/spark-assembly-*.jar: No su相关的知识,希望对你有一定的参考价值。
刚刚安装好hive,进行第一次启动
[hadoop@ltt1 bin]$ ./hive ls: cannot access /home/hadoop/spark-2.2.0-bin-hadoop2.6/lib/spark-assembly-*.jar: No such file or directory which: no hbase in (/home/hadoop/hive110/bin:/home/hadoop/spark-2.2.0-bin-hadoop2.6/bin:/home/hadoop/scala-2.11.0/bin:/home/hadoop/protobuf250/bin:/home/hadoop/hadoop260/bin:/home/hadoop/zookeeper345/bin:/home/hadoop/maven339/bin:/home/hadoop/jdk1.8.0_144/bin:/home/hadoop/spark-2.2.0-bin-hadoop2.6/bin:/home/hadoop/scala-2.11.0/bin:/home/hadoop/protobuf250/bin:/home/hadoop/hadoop260/bin:/home/hadoop/zookeeper345/bin:/home/hadoop/maven339/bin:/home/hadoop/jdk1.8.0_144/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/hadoop/bin) Logging initialized using configuration in file:/home/hadoop/hive110/conf/hive-log4j.properties WARNING: Hive CLI is deprecated and migration to Beeline is recommended. hive (default)>
会出现一个提示
ls: cannot access /home/hadoop/spark-2.2.0-bin-hadoop2.6/lib/spark-assembly-*.jar: No such file or directory
出现这个问题的原因是
spark升级到spark2以后,原有lib目录下的大JAR包被分散成多个小JAR包,原来的spark-assembly-*.jar已经不存在,所以hive没有办法找到这个JAR包。
>>提君博客原创 http://www.cnblogs.com/tijun/ <<
解决方法
打开hive的安装目录下的bin目录,找到hive文件
cd $HIVE_HOME/bin
vi hive
找到下图中的位置
将鼠标定位的位置,更改成下图
>>提君博客原创 http://www.cnblogs.com/tijun/ <<
这样问题就解决了。
以上是关于初次启动hive,解决 ls: cannot access /home/hadoop/spark-2.2.0-bin-hadoop2.6/lib/spark-assembly-*.jar: No su的主要内容,如果未能解决你的问题,请参考以下文章
完美解决初次使用NAS官网模型实例代码时报错cannot import name Ordered dictionary from typing
问题随记 —— Cannot create directory /tmp/hive. Name node is in safe mode.
centos:解决docker容器内挂载目录无权限 ls: cannot open directory .: Permission denied
ls: cannot open directory .: Permission denied
解决kylin报错 ClassCastException org.apache.hadoop.hive.ql.exec.ConditionalTask cannot be cast to org.ap