当我去安装时,出现此错误:
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
获取有关如何解决问题的建议。
aptitude
首先,如果你没有,你必须安装$ sudo apt-get install aptitude
然后,您可以运行命令,指示您要安装
openssh-server
$ sudo aptitude install openssh-server
程序会向您显示有关如何解决问题的建议。通常第一个解决方案不起作用。您可以按
n
请求新的建议。按y
接受安装openssh-server
并降级其他一些软件包的解决方案。