我正在尝试从我的 Ubuntu 系统卸载 Cloudera Hadoop。为此,我尝试了sudo apt-get remove hadoop
命令,但该命令失败并显示以下消息:
ubuntu@ip-10-82-19-71:~/cluster-deployer/src$ sudo apt-get remove hadoop
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package hadoop is not installed, so not removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
hadoop-hdfs-datanode : Depends: hadoop-hdfs (= 2.5.0+cdh5.3.0+781-1.cdh5.3.0.p0.54~precise-cdh5.3.0) but it is not going to be installed
hadoop-hdfs-namenode : Depends: hadoop-hdfs (= 2.5.0+cdh5.3.0+781-1.cdh5.3.0.p0.54~precise-cdh5.3.0) but it is not going to be installed
hadoop-yarn-nodemanager : Depends: hadoop-yarn (= 2.5.0+cdh5.3.0+781-1.cdh5.3.0.p0.54~precise-cdh5.3.0) but it is not going to be installed
hadoop-yarn-resourcemanager : Depends: hadoop-yarn (= 2.5.0+cdh5.3.0+781-1.cdh5.3.0.p0.54~precise-cdh5.3.0) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
最初,此命令不起作用,因此我杀死了一个yarn
进程kill -9 <pid>
,然后执行上述命令,但现在我无法卸载任何东西,也无法删除任何东西:(
下一步我应该做什么?
答案1
看起来hadoop
软件包没有安装与 APT:“软件包 hadoop 未安装,因此无法删除”。如果您已hadoop
通过其他方式安装,例如make
或rpm
,则必须了解如何具体卸载该软件包。
答案2
我完全错过了这个。答案就在我面前。sudo apt-get update
命令解决了这个问题。这个技巧在命令本身的输出中给出sudo apt-get remove hadoop
(在最后一行)
很抱歉造成麻烦,非常感谢您的快速回答:)