我从几天开始学习sqoop并成功安装并配置了hadoop。
hadoop_usr@sawai-Lenovo-G580:/usr/local/sqoop/bin$ sqoop2-server start
Setting conf dir: /usr/local/sqoop/bin/conf
Sqoop home directory: /usr/local/sqoop
The Sqoop server is already started.
hadoop_usr@sawai-Lenovo-G580:/usr/local/sqoop/bin$ sqoop
sqoop: command not found
sqoop服务器已在运行,当我尝试触发sqoop命令时,我收到错误消息。 command not found
。 sqoop home已经在路径
export HADOOP_HDFS_HOME=$HADOOP_HOME
export YARN_HOME=$HADOOP_HOME
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export PATH=$PATH:$HADOOP_HOME/sbin:$HADOOP_HOME/bin
export HADOOP_INSTALL=$HADOOP_HOME
export SQOOP_HOME=/usr/local/sqoop
export SQOOP_CONF_DIR=$SQOOP_HOME/conf
export SQOOP_CLASSPATH=$SQOOP_HOME/server/lib
export PATH=$PATH:$SQOOP_HOME/bin:$SQOOP_CONF:$SQOOP_CLASSPATH
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/hadoop/sbin:/usr/local/hadoop/bin:/usr/local/sqoop/bin::/usr/local/sqoop/server/lib
请帮我解决此问题。
提前致谢。
答案 0 :(得分:0)
command not found
错误是因为路径没有设置相同。
请设置您已经完成的sqoop
路径。
export PATH = $ PATH:$ SQOOP_HOME / bin:$ SQOOP_CONF:$ SQOOP_CLASSPATH
编译已设置 $ PATH 的文件或重新启动终端。
答案 1 :(得分:0)
将以下命令放在.bashrc文件中
export SQOOP_HOME=/home/pj/sqoop
export PATH=$PATH:$SQOOP_HOME/bin
并重新启动.bashrc
source .bashrc
如果问题仍然存在,请重启终端。