Hadoop安装问题:权限被拒绝

我按照这个 tutorial 安装 Hadoop。不幸的是,当我运行 dfs namenode -format 脚本时 - 控制台上打印了以下错误:

但最后我看到了这个消息

dfs namenode -format

WARNING: /home/hdoop/hadoop-3.2.1/logs does not exist. Creating.
mkdir: cannot create directory ‘/home/hdoop/hadoop-3.2.1/logs’: Permission denied
ERROR: Unable to create /home/hdoop/hadoop-3.2.1/logs. Aborting.

我跑步的时候也谢谢你

./start-dfs.sh

Starting namenodes on [localhost]
localhost: WARNING: /home/hdoop/hadoop-3.2.1/logs does not exist. Creating.
Starting datanodes
Starting secondary namenodes [blabla]
blabla: Warning: Permanently added 'blabla,192.168.100.10' (ECDSA) to the list of known hosts.
stack overflow Hadoop installation Issue:Permission denied
原文答案

答案:

作者头像
  1. 创建 目录: - 创建“ logs ”目录通过使用root access。在这种情况下,目录为 logs/home/hdoop/hadoop-3.2.1/ (例如。”/home/{username}/{提取的hadoop目录}/“)
  2. 给出目录的访问: - 在这种情况下,使用 sudo chmod 777 {directory location} 可以访问它 - sudo chmod 777 /home/hdoop/hadoop-3.2.2/logs 在我的情况下查看其工作起来,请参见下面的图像: solved it by giving access of following directory