clq@clq-virtual-machine:/usr/local/hadoop/hadoop-2.8.0/sbin$ ./start-all.sh This script is Deprecated. Instead use start-dfs.sh and start-yarn.shStarting namenodes on [0.0.0.0]clq@0.0.0.0's password: 0.0.0.0: mkdir: 无法创建目录"/usr/local/hadoop/hadoop-2.8.0/logs": 权限不够0.0.0.0: starting namenode, logging to /usr/local/hadoop/hadoop-2.8.0/logs/hadoop-clq-namenode-clq-virtual-machine.out0.0.0.0: chown: 无法访问'/usr/local/hadoop/hadoop-2.8.0/logs': 没有那个文件或目录0.0.0.0: /usr/local/hadoop/hadoop-2.8.0/sbin/hadoop-daemon.sh: 行 159: /usr/local/hadoop/hadoop-2.8.0/logs/hadoop-clq-namenode-clq-virtual-machine.out: 没有那个文件或目录0.0.0.0: head: 无法打开'/usr/local/hadoop/hadoop-2.8.0/logs/hadoop-clq-namenode-clq-virtual-machine.out' 读取数据: 没有那个文件或目录0.0.0.0: /usr/local/hadoop/hadoop-2.8.0/sbin/hadoop-daemon.sh: 行 177: /usr/local/hadoop/hadoop-2.8.0/logs/hadoop-clq-namenode-clq-virtual-machine.out: 没有那个文件或目录0.0.0.0: /usr/local/hadoop/hadoop-2.8.0/sbin/hadoop-daemon.sh: 行 178: /usr/local/hadoop/hadoop-2.8.0/logs/hadoop-clq-namenode-clq-virtual-machine.out: 没有那个文件或目录clq@localhost's password:
解决方法:sudo chmod -R a+w /usr/local/hadoop
添加权限即可