从cygwin命令提示符执行“hadoop版本”时显示的路径不正确

k0pti3hp  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(221)

我已经在Windows7机器上安装了Hadoop1.x和cygwin,并在.bashrc中设置了home path和bin path,如下所示。

bashrc先生

export JAVA_HOME=/cygdrive/c/java/jdk1.7
export HADOOP_HOME=/cygdrive/c/apache/hadoop
export PATH=$HADOOP_HOME/bin/:$PATH

在命令提示符处执行命令“hadoop version”时,我看到与路径相关的错误消息,如下所示。请指出哪些路径设置不正确。我已经分别在c:/apache/hadoop和c:/java/jdk1.7中安装了hadoop和java。

cygwin命令提示符

$ hadoop version
Warning: $HADOOP_HOME is deprecated.

/cygdrive/c/apache/hadoop/bin/hadoop: line 350: /cygdrive/c/java/jdk1.7/bin/bin/java: No such file or directory
cygwin warning:
  MS-DOS style path detected: C:\apache\hadoop\/build/native
  Preferred POSIX equivalent is: /cygdrive/c/apache/hadoop/build/native
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
/cygdrive/c/apache/hadoop/bin/hadoop: line 434: /cygdrive/c/java/jdk1.7/bin/bin/java: No such file or directory
/cygdrive/c/apache/hadoop/bin/hadoop: line 434: exec: /cygdrive/c/java/jdk1.7/bin/bin/java: cannot execute: No such file or directory
vc9ivgsu

vc9ivgsu1#

在将hadoop-env.sh中的java主路径从 /cygdrive/c/java/jdk1.7/bin/cygdrive/c/java/jdk1.7

相关问题