安装openssh-server报错

来源:互联网 发布:炫踪网络 加班严重吗 编辑:程序博客网 时间:2024/05/16 15:58

安装openssh-server时

sudo apt-get install ssh openssh-server

报以下错误

现在没有可用的软件包 openssh-server,但是它被其它的软件包引用了.
这可能意味着这个缺失的软件包可能已被废弃,或者只能在劳动保险发布源中找到.
E:软件包openssh-server还没有可供安装的候选者


错误原因:

当前的源类表中没有你要安装的软件包,


解决办法1:

软件源 -》下载自 -》其他站点-》选择最佳服务器

自动搜索后,会找到一个最佳的服务器,点“选择服务器”

然后重新安装openssh-server

sudo apt-get install ssh openssh-server


解决办法2:

(1)修改 /etc/apt/sources.list

gedit /etc/apt/sources.list

(2)添加源列表

百度“ubuntu sources.list”,找一个可用的源列表(如http://blog.163.com/jzq_520/blog/static/11931126220123774356172/),将它们添加打/etc/apt/sources.list 中。

也可以直接添加以下源列表:

# Archive.ubuntu.com 欧洲,此为官方源,推荐使用 ,PING=500
deb http://archive.ubuntu.com/ubuntu/ feisty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ feisty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ feisty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ feisty-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ feisty main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ feisty-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ feisty-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ feisty-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu-cn/ feisty main restricted universe multiverse

# 中国 台湾省台湾大学,推荐网通用户使用,电信PING平均响应速度41MS,PING=100
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-updates main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-updates main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-backports main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-backports main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-security main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-security main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-proposed main multiverse restricted universe

deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-proposed main restricted universe multiverse

(3)更新源

sudo apt-get update
sudo apt-get upgrade

如果添加的源列表太多,更新时间会比较长。

(4)重新安装openssh-server

sudo apt-get install ssh openssh-server


原创粉丝点击