启动hadoop时出错

启动hadoop时出错

当我尝试以 身份运行 Hadoop 时bin/start-all.sh,出现此错误:

 mkdir: cannot create directory /home/prasanna/Desktop/hadoop/libexec/../logs: Permission denied  

 chown: cannot access /home/prasanna/Desktop/hadoop/libexec/../logs: No such file or directory  

 starting namenode, logging to /home/prasanna/Desktop/hadoop/libexec/../logs/hadoop-prasanna-namenode-prasanna-VirtualBox.out  

 /home/prasanna/Desktop/hadoop/bin/hadoop-daemon.sh: line 135: /home/prasanna/Desktop/hadoop/libexec/../logs/hadoop-prasanna-namenode-prasanna-VirtualBox.out: No such file or directory  

 head: cannot open /home/prasanna/Desktop/hadoop/libexec/../logs/hadoop-prasanna-namenode-prasanna-VirtualBox.out for reading: No such file or directory  

这是什么原因?我该如何解决这个问题?

PS:我对 Linux 还很陌生

答案1

您正在使用的用户没有在桌面中创建文件夹的 root 权限,因此请使用以下命令sudo

例子:

cd hadoop/bin
sudo ./start-all.sh

相关内容