HADOOP 和 SQOOP 运行时出现奇怪的错误

HADOOP 和 SQOOP 运行时出现奇怪的错误
hdp@ubuntu:~$ $HADOOP_HOME/bin/hadoop version
bash: $/home/hdp/hadoop-2.6.4/bin/hadoop: No such file or directory
hdp@ubuntu:~$ sqoop version 
/usr/lib/sqoop//bin/sqoop: line 79: dirname: command not found
/usr/lib/sqoop//bin/sqoop: line 81: basename: command not found
/usr/lib/sqoop//bin/sqoop: line 97: dirname: command not found
/usr/lib/sqoop//bin/sqoop: line 100: /home/hdp/configure-sqoop: No such file or directory
/usr/lib/sqoop//bin/sqoop: line 101: /home/hdp/$/home/hdp/hadoop-2.6.4/bin/hadoop: No such file or directory
/usr/lib/sqoop//bin/sqoop: line 101: exec: /home/hdp/$/home/hdp/hadoop-2.6.4/bin/hadoop: cannot execute: No such file or directory
hdp@ubuntu:~$ 

答案1

如果你echo $HADOOP_HOME发现路径输入错误,这将输出$/home/hdp/hadoop-2.6.4/既不是目录也不是文件,bash 很聪明,可以做出回答。

要修复它只需在终端中输入此命令

HADOOP_HOME=/home/hdp/hadoop-2.6.4/
export HADOOP_HOME

相关内容