E:软件包‘openssh-server’没有安装候选项

E:软件包‘openssh-server’没有安装候选项

我尝试使用Xshell连接VirtualBox中安装的windows和Linux(Ubuntu 16.04)。但最近它们无法互相通信。我关闭了防火墙,使用了“仅主机”模式、NAT和Bridge模式。仍然不起作用。有人建议安装ssh,我发现openssh-client已经安装,但openssh-server尚未安装,所以我尝试通过命令行安装openssh-server

sudo apt-get install openssh-server

问题如下:**

sudo apt-get install openssh-server 
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Package openssh-server 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 'openssh-server' has no installation candidate

** 我尝试使用“sudo apt-get update”,但出现了另一个问题,如下所示”

**

sudo apt-get update 
Err:1 http://dl.google.com/linux/chrome/deb stable InRelease   Temporary failure resolving 'dl.google.com' 
Err:2 http://ca.archive.ubuntu.com/ubuntu xenial InRelease    
  Temporary failure resolving 'ca.archive.ubuntu.com' > 
Reading package lists...Done> 
W: Failed to fetch
http://ca.archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Temporary
failure resolving 'ca.archive.ubuntu.com' 
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/InRelease 
  Temporary failure resolving 'dl.google.com'  
W: Some index files failed to download. They have been ignored, or old ones used instead.**

我更改了源,例如主源或 Canda 源。但不起作用。我非常感谢那些愿意提供帮助的人。非常感谢!

相关内容