Debian 安裝 openssh-server 遇到的問題,分享下解決方法。如果是 Debian 初始化安裝后出現的問題,使用第一個方法解決。若是系統用過一陣子才突然出現,則用第二個方法(也適用于 Ubuntu)。
openssh-server 安裝報錯信息:
[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 有問題,其它軟件也不可安裝。
解決方法是正確配置軟件安裝源,具體請參考這篇文章,里面有詳細介紹如何正確配置系統軟件源。
方法二
嘗試修復系統依賴損壞,刪除 apt 緩存和列表目錄文件,然后重建軟件包索引。
apt-get install -f apt-get clean rm -rf /var/lib/apt/lists/* apt-get update




















