Debian 安装 openssh-server
遇到的问题,分享下解决方法。如果是 Debian 初始化安装后出现的问题,使用第一个方法解決。若是系统用过一阵子才突然出现,则用第二个方法(也适用于 Ubuntu)。
文章源自国外主机测评-https://www.zjcp.org/14660.html
openssh-server
安装报错信息:文章源自国外主机测评-https://www.zjcp.org/14660.html
[email protected]:~# 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
有问题,其它软件也不可安装。文章源自国外主机测评-https://www.zjcp.org/14660.html
解决方法是正确配置软件安装源,具体请参考这篇文章,里面有详细介绍如何正确配置系统软件源。文章源自国外主机测评-https://www.zjcp.org/14660.html
方法二
尝试修复系统依赖损坏,删除 apt 缓存和列表目录文件,然后重建软件包索引。文章源自国外主机测评-https://www.zjcp.org/14660.html
apt-get install -f apt-get clean rm -rf /var/lib/apt/lists/* apt-get update文章源自国外主机测评-https://www.zjcp.org/14660.html文章源自国外主机测评-https://www.zjcp.org/14660.html