OpenSSH 服务器安装导致错误 E: Unable to correct questions, you have hold broken packages

Posted

技术标签:

【中文标题】OpenSSH 服务器安装导致错误 E: Unable to correct questions, you have hold broken packages【英文标题】:OpenSSH server installation results in error E: Unable to correct problems, you have held broken packages 【发布时间】:2019-10-17 22:39:05 【问题描述】:

我尝试像这样在 Ubuntu 16.04 上安装 OpenSSH 服务器:

sudo apt-get install openssh-server

但是,它显示以下消息:

dell@dell-Latitude-E6400:~$ 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:7.2p2-4) but 1:7.2p2-4ubuntu2.8 is to be installed
                  Depends: openssh-sftp-server but it is not going to be installed
                  Recommends: ncurses-term but it is not going to be installed
                  Recommends: ssh-import-id but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

【问题讨论】:

任何人请帮我解决这个错误 *** 用于软件开发方面的帮助。您应该考虑在Ask Ubuntu 或Unix & Linux 上而不是在这里提问。 【参考方案1】:

试试这个对我有用的。

sudo apt purge openssh-client

实际上你的系统上已经安装了openssh-client,你必须先删除它,然后用这个命令安装openssh-server。

sudo apt install openssh-server

【讨论】:

以上是关于OpenSSH 服务器安装导致错误 E: Unable to correct questions, you have hold broken packages的主要内容,如果未能解决你的问题,请参考以下文章

CentOS 7升级OpenSSH

ubuntu 安装ssh服务端: openssh-server 失败

安装后脚本:OpenSSH 失败

Ubuntu16.04下安装openssh-server

Linux:安装OpenSSH-Server E:Package openssh-server has no installation candidate

centos6.5安装openssh7.2p2方法