我刚刚安装了 ubuntu,没想到会这样。至少在 ubuntu 20.04.1 LTS 中从未发生过这种情况。我确实运行了 sudo apt update,然后尝试安装。
$ sudo apt install openssh-server -y
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:8.2p1-4)
Depends: openssh-sftp-server
Recommends: ssh-import-id but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我安装了 ssh-import-id,然后尝试安装 openss-sftp-server,但仍然收到此依赖错误。