命令是 bin/start-all.sh
hadoop@user-HP-dx2480-MT-NA125PA:/usr/local/hadoop/hadoop$ bin/start-all.sh
错误
mv: cannot move `/usr/local/hadoop/hadoop/bin/../logs/hadoop-hadoop-namenode-user-HP-dx2480-MT-NA125PA.out.4' to `/usr/local/hadoop/hadoop/bin/../logs/hadoop-hadoop-namenode-user-HP-dx2480-MT-NA125PA.out.5': Permission denied
mv: try to overwrite `/usr/local/hadoop/hadoop/bin/../logs/hadoop-hadoop-namenode-user-HP-dx2480-MT-NA125PA.out.4', overriding mode 0644 (rw-r--r--)?
mv: try to overwrite `/usr/local/hadoop/hadoop/bin/../logs/hadoop-hadoop-namenode-user-HP-dx2480-MT-NA125PA.out.3', overriding mode 0644 (rw-r--r--)?
mv: try to overwrite `/usr/local/hadoop/hadoop/bin/../logs/hadoop-hadoop-namenode-user-HP-dx2480-MT-NA125PA.out.2', overriding mode 0644 (rw-r--r--)?
有什么解决办法吗?
答案1
这似乎是权限问题。尝试使用sudo
命令执行 start-all。
答案2
创建用户
sudo addgroup hadoop sudo adduser --ingroup hadoop hduser
添加以下行将 hduser 添加到 sudoers 中,
vi /etc/sudoers
hduser (ALL)=(ALL) ALL
更改 Hadoop 所有者
chown -R hduser:hadoop hadoop
其中hduser
→ 用户名,hadoop
→ 组名