尝试 apt-get install sftp 失败,并显示:E: 软件包‘sftp’没有安装候选项

尝试 apt-get install sftp 失败,并显示:E: 软件包‘sftp’没有安装候选项
magnus@mt-dell:~$ sudo apt-get install sftp
[sudo] password for magnus: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package sftp is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'sftp' has no installation candidate

该怎么办?

答案1

我相信您要安装的包是 openssh-server。

sudo apt-get install openssh-server

来源:如何在 Ubuntu 上设置受限的 SFTP 服务器?

答案2

openssh-client软件包包含sftp可执行文件。使用以下命令进行安装:

sudo apt-get install openssh-client

来源:https://packages.ubuntu.com/focal/amd64/openssh-client/filelist

相关内容