无法安装 Openssh 服务器或客户端

无法安装 Openssh 服务器或客户端

当我去安装时,出现此错误:

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,当我尝试安装列出的依赖项时,它说我拥有最新版本。

答案1

我在使用 Ubuntu 14.04 时也遇到了类似的问题。当我尝试安装openssh-server(和任何其他软件)时,我收到一条E: Error, pkgProblemResolver消息,表示没有任何软件包处于“保留”状态。

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

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

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

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

相关内容