红联Linux门户
Linux帮助

Ubuntu apt-get install错误:unmet dependencies

发布时间:2015-09-25 16:07:24来源:linux网站作者:OneSea

1.问题描述

如下所示:

liyihai@ubuntu:~$ sudo apt-get install openssh-server 
Reading package lists... Done 
Building dependency tree
Reading state information... Done 
Some packages could not be installed. This may mean that you have 
requested an impossible situation or if you are using the unstable 
distribution that some required packages have not yet been created 
or been moved out of Incoming. 
The following information may help to resolve the situation: 
 
The following packages have unmet dependencies: 
openssh-server : Depends: openssh-client (= 1:6.6p1-2ubuntu1) 
E: Unable to correct problems, you have held broken packages. 


2.解决方法

在上面的提示信息中指出“openssh-server: Depends:openssh-client(=1:6.6p1-2ubuntu1)”,于是先安装openssh-client,然后再安装openssh-server即可。

(1)安装openssh-client的时候指定其版本(开始时没有指定版本,最后还是失败)

sudo apt-get install openssh-client = 1:6.6p1-2ubuntu1 

注意:上面命令参数中等号(=)两边不能有空格!

(2)重新安装openssh-server

sudo apt-get install openssh-server 

说明:

使用apt-get -f insall并不能解决这个问题。


Ubuntu12.04_X64 apt-get install报错404:http://www.linuxdiyf.com/linux/14328.html

ubuntu如何卸载apt-get install安装的软件:http://www.linuxdiyf.com/linux/14109.html

ubuntu15.04怎么卸载软件以及卸载命令:http://www.linuxdiyf.com/linux/12967.html