我把jdk放在“ E:/ cygwin / jdk7 ”中,所以我在环境和hadoop-env.sh中都更新了JAVA_HOME
。
但是当我第一次运行./hdfs namenode -format时,我得到了这个:
$ ./hdfs namenode -format
E:/cygwin/hadoop-2.2.0/etc/hadoop/hadoop-env.sh: line 18: $'\r': command not found
E:/cygwin/hadoop-2.2.0/etc/hadoop/hadoop-env.sh: line 20: $'\r': command not found
E:/cygwin/hadoop-2.2.0/etc/hadoop/hadoop-env.sh: line 25: $'\r': command not found
E:/cygwin/hadoop-2.2.0/etc/hadoop/hadoop-env.sh: line 32: $'\r': command not found
E:/cygwin/hadoop-2.2.0/etc/hadoop/hadoop-env.sh: line 34: $'\r': command not found
E:/cygwin/hadoop-2.2.0/etc/hadoop/hadoop-env.sh: line 36: syntax error near unexpected token `$'do\r''':/cygwin/hadoop-2.2.0/etc/hadoop/hadoop-env.sh: line 36: `for f in $HADOOP_HOME/contrib/capacity-scheduler/*.jar; do/bin/java: No such file or directory
/bin/java: cannot execute: No such file or directory
我改变了core-site.xml,hdfs-site.xml,mapred-site.xml,yarn-site.xml等百倍,但它仍然无法正常工作
如果有人提出任何建议我感激不尽!