OpenSSH服务器安装导致错误E:无法纠正问题,您持有损坏的软件包

问题描述 投票:0回答:1

我尝试像这样在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.

ubuntu apt openssh
1个回答
0
投票

尝试使用这个对我有用。

sudo apt purge openssh-client

实际上您的系统上已安装openssh-client,您必须先删除它,然后使用此命令安装openssh-server。

sudo apt install openssh-server
© www.soinside.com 2019 - 2024. All rights reserved.