我安装了hadoop 2.6,一切似乎都有效。然后我重新启动所有机器而不先停止dfs,我收到下面的错误。有什么办法解决吗?
$ ./sbin/start-dfs.sh
./sbin/start-dfs.sh: line 55: $hadoop/bin/bin/hdfs: No such file or directory
Starting namenodes on []
./sbin/start-dfs.sh: line 60: $hadoop/bin/sbin/hadoop-daemons.sh: No such file or directory
./sbin/start-dfs.sh: line 73: $hadoop/bin/sbin/hadoop-daemons.sh: No such file or directory
./sbin/start-dfs.sh: line 108: $hadoop/bin/bin/hdfs: No such file or directory
~/hadoop$ ./bin/hadoop namenode -format
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.
HADOOP_HDFS_HOME not found!
~/hadoop$ ./bin/hdfs namenode -format
Error: Could not find or load main class org.apache.hadoop.hdfs.server.namenode.NameNode
答案 0 :(得分:0)
在.bashrc和hadoop-env.sh
中设置环境变量export HADOOP_HDFS_HOME=$HADOOP_HOME