前天在虚拟机中安装了ubuntu 10.10,装好基本系统后,在安装openssh中,使用sudo apt-get install openssh-server命令,发现安装不了,出现如下问题:ubuntu
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 candidatewindows
通过两天的百度与google,基本就是使用sudo apt-get update 进行升级,发现居然链接不到网络,可是能够ping通,就是升级不了,不少人都说是源的问题,可是我在windows下能够到源地址上下载东西,源没问题。继续百度和google,发现不少人也遇到过,有多种多样的解决办法,但对都是没用,依然没获得解决。网络
这个问题困扰了我两天,忽然灵机一动,是否是虚拟机中使用网络链接方式的问题?ssh
因而,我把虚拟机的网络链接从NAT方式改成桥接方式,换IP地址,DNS,重启。ui
再使用sudo apt-get update ,OK 问题解决!google
而后,使用sudo apt-get install openssh-server 就能够安装了。orm
终于把问题解决了,而后就能够使用远程登陆了!server