这是在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
参见上面的输出作为编辑。我宁愿不安装客户端,而只是想从安装冲突中清除它以安装其他软件包。
—
rdoubleui 2015年
在这里,您将找到可以应用askubuntu.com/questions/140246/…的
—
JoKeR 2015年
删除这些软件包,添加答案
—
Faizan Akram Dar
apt-cache policy openssh-client
显然,您正在尝试安装未使用当前的openssh-client开发或测试的软件包