错误计数错误:linux-generic-pae:依赖于linux-image-generic-pae(= 3.2.0.37.44),但已安装的版本为3.2.0.37.45。

我在Synaptic中遇到了一个损坏的计数,并且无法通过运行以下命令来修复它:
sudo apt-get -f install

以下是终端的摘录:
$ sudo apt-get check
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 linux-generic-pae : Depends: linux-image-generic-pae (= 3.2.0.37.44) but 3.2.0.37.45 is installed
                     Depends: linux-headers-generic-pae (= 3.2.0.37.44) but 3.2.0.37.45 is installed
N: Ignoring file '50unattended-upgrades.distrib' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
E: Unmet dependencies. Try using -f.

在运行sudo apt-get -f install之后的提取如下:
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  openclient-about 3270-common ibm-config-anyconnect
  openclient-agnclient-notifications xfonts-x3270-misc libqt4-gui
  ibm-3270-emulator x3270 unity-lens-ocdc anyconnect ibm-cck-ff4
  ibm-lotus-upgrade-fix ibm-ocdc-documentation ocdc-unity-tweaks
  ibm-application-menus
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  linux-generic-pae
The following packages will be upgraded:
  linux-generic-pae
1 upgraded, 0 newly installed, 0 to remove and 181 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,728 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
dpkg: dependency problems prevent configuration of linux-generic-pae:
 linux-generic-pae depends on linux-image-generic-pae (= 3.2.0.37.44); however:
  Version of linux-image-generic-pae on system is 3.2.0.37.45.
 linux-generic-pae depends on linux-headers-generic-pae (= 3.2.0.37.44); however:
  Version of linux-headers-generic-pae on system is 3.2.0.37.45.
dpkg: error processing linux-generic-pae (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.<br>
                          Errors were encountered while processing:
 linux-generic-pae
N: Ignoring file '50unattended-upgrades.distrib' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
E: Sub-process /usr/bin/dpkg returned an error code (1)

我卡住了,无法进行任何进一步的安装。
1个回答

我通过运行dpkg --remove linux-image-server然后再运行apt-get install linux-image-server解决了一个几乎相同的问题(请参见下文)。在你的情况下:
sudo dpkg --remove linux-generic-pae
sudo apt-get install linux-generic-pae

我的问题出在linux-image-server内核元包上,而不是linux-generic-pae元包上,但版本号却是相同的:

The following packages have unmet dependencies:
 linux-server : Depends: linux-image-server (= 3.2.0.37.44) but 3.2.0.37.45 is to be installed
                Depends: linux-headers-server (= 3.2.0.37.44) but 3.2.0.37.45 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

遇到了同样的问题,但是是与linux-generic软件包依赖于特定版本的linux-image-generic和linux-headers-generic有关,但是要安装的新版本导致了“未满足的依赖关系”错误。 通过使用sudo dpkg --remove linux-generic && sudo apt-get install linux-generic解决了这个问题。 谢谢! - Simón
在我的情况下,软件包是linux-image-generic-pae(注意linux-*linux-image-*之间的区别-请仔细检查错误信息中的软件包名称)。一旦我使用正确的软件包名称运行了这两个命令,一切都正常了。 - user149408