我在 Ubuntu 12.04 上安装了 Apache Hadoop 1.0.4。我按照http://hadoop.apache.org/docs/stable/single_node_setup.html上的说明,到达了“执行”部分。我在 $ bin/start-all.sh 上失败了,错误消息如下。我的用户名是安森。
$ start-all.sh
mkdir: cannot create directory `/var/log/hadoop/anson': Permission denied
chown: cannot access `/var/log/hadoop/anson': No such file or directory
mkdir: cannot create directory `/var/run/hadoop': Permission denied
starting namenode, logging to /var/log/hadoop/anson/hadoop-anson-namenode-anson-Ubuntu-T430.out
/usr/sbin/hadoop-daemon.sh: line 136: /var/run/hadoop/hadoop-anson-namenode.pid: No such file or directory
/usr/sbin/hadoop-daemon.sh: line 135: /var/log/hadoop/anson/hadoop-anson-namenode-anson-Ubuntu-T430.out: No such file or directory
head: cannot open `/var/log/hadoop/anson/hadoop-anson-namenode-anson-Ubuntu-T430.out' for reading: No such file or directory
localhost: mkdir: cannot create directory `/var/log/hadoop/anson': Permission denied
localhost: chown: cannot access `/var/log/hadoop/anson': No such file or directory
localhost: mkdir: cannot create directory `/var/run/hadoop': Permission denied
localhost: starting datanode, logging to /var/log/hadoop/anson/hadoop-anson-datanode-anson-Ubuntu-T430.out
localhost: /usr/sbin/hadoop-daemon.sh: line 136: /var/run/hadoop/hadoop-anson-datanode.pid: No such file or directory
localhost: /usr/sbin/hadoop-daemon.sh: line 135: /var/log/hadoop/anson/hadoop-anson-datanode-anson-Ubuntu-T430.out: No such file or directory
localhost: head: cannot open `/var/log/hadoop/anson/hadoop-anson-datanode-anson-Ubuntu-T430.out' for reading: No such file or directory
localhost: mkdir: cannot create directory `/var/log/hadoop/anson': Permission denied
localhost: chown: cannot access `/var/log/hadoop/anson': No such file or directory
localhost: mkdir: cannot create directory `/var/run/hadoop': Permission denied
localhost: starting secondarynamenode, logging to /var/log/hadoop/anson/hadoop-anson-secondarynamenode-anson-Ubuntu-T430.out
localhost: /usr/sbin/hadoop-daemon.sh: line 136: /var/run/hadoop/hadoop-anson-secondarynamenode.pid: No such file or directory
localhost: /usr/sbin/hadoop-daemon.sh: line 135: /var/log/hadoop/anson/hadoop-anson-secondarynamenode-anson-Ubuntu-T430.out: No such file or directory
localhost: head: cannot open `/var/log/hadoop/anson/hadoop-anson-secondarynamenode-anson-Ubuntu-T430.out' for reading: No such file or directory
mkdir: cannot create directory `/var/log/hadoop/anson': Permission denied
chown: cannot access `/var/log/hadoop/anson': No such file or directory
mkdir: cannot create directory `/var/run/hadoop': Permission denied
starting jobtracker, logging to /var/log/hadoop/anson/hadoop-anson-jobtracker-anson-Ubuntu-T430.out
/usr/sbin/hadoop-daemon.sh: line 136: /var/run/hadoop/hadoop-anson-jobtracker.pid: No such file or directory
/usr/sbin/hadoop-daemon.sh: line 135: /var/log/hadoop/anson/hadoop-anson-jobtracker-anson-Ubuntu-T430.out: No such file or directory
head: cannot open `/var/log/hadoop/anson/hadoop-anson-jobtracker-anson-Ubuntu-T430.out' for reading: No such file or directory
localhost: mkdir: cannot create directory `/var/log/hadoop/anson': Permission denied
localhost: chown: cannot access `/var/log/hadoop/anson': No such file or directory
localhost: mkdir: cannot create directory `/var/run/hadoop': Permission denied
localhost: starting tasktracker, logging to /var/log/hadoop/anson/hadoop-anson-tasktracker-anson-Ubuntu-T430.out
localhost: /usr/sbin/hadoop-daemon.sh: line 136: /var/run/hadoop/hadoop-anson-tasktracker.pid: No such file or directory
localhost: /usr/sbin/hadoop-daemon.sh: line 135: /var/log/hadoop/anson/hadoop-anson-tasktracker-anson-Ubuntu-T430.out: No such file or directory
localhost: head: cannot open `/var/log/hadoop/anson/hadoop-anson-tasktracker-anson-Ubuntu-T430.out' for reading: No such file or directory
anson@anson-Ubuntu-T430:~$ cd /var/run/hadoop
-bash: cd: /var/run/hadoop: No such file or directory