无法安装Openssh-server或客户端

当我去安装时,我收到此错误:

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: libxcb1 : Depends: libxau6 but it is not going to be installed Depends: libxdmcp6 but it is not going to be installed openssh-server : Depends: openssh-client (= 1:5.9p1-5ubuntu1) Recommends: xauth but it is not going to be installed Recommends: ssh-import-id but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. 

我正在运行Ubuntu 12.04.4当我尝试安装列出的依赖项时,它说我有最新的版本。

我和Ubuntu 14.04有类似的问题。 当我尝试安装openssh-server (以及任何其他软件)时,我收到了E: Error, pkgProblemResolver消息,而没有任何软件包是“hold”。

问题是由您尝试安装的软件包版本引起的。 解决方案可能涉及删除和降级您已有的一些软件包。 您可以使用aptitude来获得有关如何解决问题的建议。

  1. 首先,如果您没有aptitude则必须安装aptitude

     $ sudo apt-get install aptitude 
  2. 然后,您可以运行指示要安装openssh-server

     $ sudo aptitude install openssh-server 
  3. 该程序将向您显示有关如何解决问题的建议。 通常第一种解决方案不起作用。 您可以按n申请新建议。 按y接受安装openssh-server的解决方案并降级其他一些软件包。