这是在Ubuntu 12.04服务器上。
尝试运行任何错误apt-get install
(尝试安装不相关的任意软件包)时出现此错误:
dpkg: dependency problems prevent configuration of openssh-server:
openssh-server depends on openssh-client (= 1:5.9p1-5ubuntu1.1); however:
Version of openssh-client on system is 1:5.9p1-5ubuntu1.4.
dpkg: error processing openssh-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency probms prevent configuration of ssh:
ssh depends on openssh-server; however:
Package openssh-server is not configured yet.
dpkg: error processing ssh (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encounter while processing:
openssh-server
ssh
E: Sub-process /usr/bin/dpkg returned an error code (1)
安装有问题的客户端版本会导致:
sudo apt-get install openssh-client=1:5.9p1-5ubuntu1.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '1:5.9p1-5ubuntu1.1' for 'openssh-client' was not found
在缺乏背景知识的情况下进行各种修复的尝试均告失败,例如
dpkg-reconfigure -a
apt-get -f install
有人可以提供建议如何解决该问题,可能需要我提供更多必要的信息吗?
如何恢复openssh更新(我猜是失败的)或使其失去焦点,以便能够安装其他软件包?
编辑:
输出apt-cache policy openssh-client
为:
openssh-client:
Installed: 1:5.9p1-5ubuntu1.4
Candidate: 1:5.9p1-5ubuntu1.4
Version table:
*** 1:5.9p1-5ubuntu1.4 0
500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
100 /var/lib/dpkg/status
1:5.9p1-5ubuntu1.3 0
500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
1:5.9p1-5ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
出于完整性考虑/etc/apt/sources.list
:
deb http://archive.ubuntu.com/ubuntu precise main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu precise-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu precise-security main restricted universe multiverse
只需删除这些软件包,即可将其apt
用于其他软件包。在终端中执行此命令。
sudo apt-get remove openssh-server openssh-client --purge && sudo apt-get autoremove && sudo apt-get autoclean && sudo apt-get update
然后重新安装openssh服务器和客户端。
sudo apt-get install openssh-server openssh-client
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句