openssh-server : Depends: libwrap0 but it is not installable 解决方法

Eric 教程 1,436 次浏览 评论已关闭

openssh-server install error

Debian 安装 openssh-server 遇到的问题,分享下解决方法。如果是 Debian 初始化安装后出现的问题,使用第一个方法解決。若是系统用过一阵子才突然出现,则用第二个方法(也适用于 Ubuntu)。

openssh-server 安装报错信息:

root@example:~# apt-get install openssh-server
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: libwrap0 (>= 7.6-4~) but it is not installable
E: Unable to correct problems, you have held broken packages.


因为系统软件源未配置或错误导致,这种情况不单安装 openssh-server 有问题,其它软件也不可安装。



尝试修复系统依赖损坏,删除 apt 缓存和列表目录文件,然后重建软件包索引。

apt-get install -f
apt-get clean
rm -rf /var/lib/apt/lists/*
apt-get update