按照网上教程的操作尝试搭建伪分布式,在启动hadoop时(./sbin/start-dfs.sh)报错如下:
- Starting namenodes on [localhost]
- localhost: starting namenode, logging to /opt/hadoop-2.5.2/logs/hadoop-root-namenode-xxw-node01.localdomain.out
- localhost: /opt/hadoop-2.5.2/bin/hdfs: line 28: which: command not found
- localhost: dirname: missing operand
- localhost: Try 'dirname --help' for more information.
- localhost: /opt/hadoop-2.5.2/bin/hdfs: line 34: /opt/hadoop-2.5.2/../libexec/hdfs-config.sh: No such file or directory
- localhost: /opt/hadoop-2.5.2/bin/hdfs: line 262: exec: : not found
- localhost: starting datanode, logging to /opt/hadoop-2.5.2/logs/hadoop-root-datanode-xxw-node01.localdomain.out
- localhost: /opt/hadoop-2.5.2/bin/hdfs: line 28: which: command not found
- localhost: dirname: missing operand
- localhost: Try 'dirname --help' for more information.
- localhost: /opt/hadoop-2.5.2/bin/hdfs: line 34: /opt/hadoop-2.5.2/../libexec/hdfs-config.sh: No such file or directory
- localhost: /opt/hadoop-2.5.2/bin/hdfs: line 262: exec: : not found
- Starting secondary namenodes [0.0.0.0]
- 0.0.0.0: starting secondarynamenode, logging to /opt/hadoop-2.5.2/logs/hadoop-root-secondarynamenode-xxw-node01.localdomain.out
- 0.0.0.0: /opt/hadoop-2.5.2/bin/hdfs: line 28: which: command not found
- 0.0.0.0: dirname: missing operand
- 0.0.0.0: Try 'dirname --help' for more information.
- 0.0.0.0: /opt/hadoop-2.5.2/bin/hdfs: line 34: /opt/hadoop-2.5.2/../libexec/hdfs-config.sh: No such file or directory
- 0.0.0.0: /opt/hadoop-2.5.2/bin/hdfs: line 262: exec: : not found
复制代码
希望各位帮忙解决一下,不胜感激!
|