一、在安装ssh时,下载失效、更新失效以及出现 Package ‘openssh-server’ has no installation candidate的情况
原因:Ubuntu 已经停止支持,但可以使用old-releases源了
解决:先备份源列表文件:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
sudo gedit /etc/apt/sources.list
把里面的内容全部替换为以下内容:
deb http://old-releases.ubuntu.com/ubuntu/ natty main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ natty-security main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ natty-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ natty-proposed main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ natty-backports main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ natty main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ natty-security main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ natty-updates main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ natty-proposed main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ natty-backports main restricted universe multiverse
重载源列表,使配置生效:
sudo apt-get update
安装SSH服务器和客户端:
sudo apt-get install openssh-server openssh-client
原文:http://blog.csdn.net/sunshingheavy/article/details/53174461
二、安装完后,在测试hadoop时,如:执行“ hadoop version
”时出现“hadoop no comment it”
原因:没有配置hadoop环境变量
解决:1. “gedit /etc/profile
”
2. 把这三条加到proflie文件的最后
export JAVA_HOME=/usr/local/lib/jdk1.8.0_121
export HADOOP_HOME=/usr/hadoop/hadoop-2.7.3
export PATH=.:$HADOOP_HOME/bin:$JAVA_HOME/bin:$PATH
在导入jdk时就该写进去这条命令。
三、测试时 fs 命令no comment it
原因:fs没有加载,需要重新下载
解决:“sudo apt-get install openafs-client
”、
总结:
遇到这些问题时,就会到处去找文档、博客,希望以后能够有能力分析出原因并且自行解决问题。平常上课,课余时间来实验室配置hadoop花了一周 ,但是现在只要二三十分钟就能够把这些搞定。人生就是这样一个阶段吧,有一半时间在遇到困难,而另一半在解决困难。