我使用的是ubuntu版本16.04
harsha@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
我可以启动sqoopserver和sqoopshell,但在终端中,当我键入sqoopshelp或sqooimport时,它会显示commandnotfound。
错误是
harsha@ubuntu:~$ sqoop help
sqoop: command not found
harsha@ubuntu:~$ sqoop -help
sqoop: command not found
harsha@ubuntu:~$ sqoop --help
sqoop: command not found
harsha@ubuntu:~$ sqoop
sqoop: command not found
下面的命令工作得很好。
sqoop2-tool upgrade
sqoop2-tool verify
sqoop2-server start
sqoop2-server stop
sqoop2-shell
这是echo$路径
/home/harsha/bin:/home/harsha/.local/bin:/usr/local/sbin:/usr/local/bin:
/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:
/usr/lib/jvm/java-8-oracle/bin:/opt/hadoop-3.0.0/bin:
/opt/apache-flume-1.8.0-bin/bin:/opt/kafka_2.12-1.0.0/bin:
/opt/zookeeper-3.5.3-beta/bin:/usr/lib/sqoop-1.99.7-bin-hadoop200/bin:/usr/lib/sqoop-1.99.7-bin-hadoop200/conf:
当前正在运行的进程是
harsha@ubuntu:~$ jps
6277 ResourceManager
5814 DataNode
90105 Jps
37418 SqoopShell
6395 NodeManager
5694 NameNode
~/.bashrc文件中的条目如下
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export PATH=$PATH:$JAVA_HOME/bin
#HADOOP HOME
#export HADOOP_PREFIX=/opt/hadoop-3.0.0
export HADOOP_HOME=/opt/hadoop-3.0.0
export PATH=$PATH:$HADOOP_HOME/bin
#FLUME HOME
export FLUME_HOME=/opt/apache-flume-1.8.0-bin
export PATH=$PATH:$FLUME_HOME/bin
#HADOOP HOME
export KAFKA_HOME=/opt/kafka_2.12-1.0.0
export PATH=$PATH:$KAFKA_HOME/bin
#ZOOKEEPER HOME
export ZOOKEEPER_HOME=/opt/zookeeper-3.5.3-beta
export PATH=$PATH:$ZOOKEEPER_HOME/bin
#SQOOP HOME
export SQOOP_HOME=/usr/lib/sqoop-1.99.7-bin-hadoop200
export SQOOP_CONF_DIR=$SQOOP_HOME/conf
export SQOOP_CLASS_PATH=$SQOOP_HOME/server/lib
export PATH=$PATH:$SQOOP_HOME/bin:$SQOOP_CONF_DIR:$SQOOP_CLASSPATH
如果有人能帮我,那将是一个很大的帮助。谢谢你的帮助。
1条答案
按热度按时间g52tjvyc1#
找到sqoop命令的路径,并将该命令的路径添加到$path变量中。