未满足的依赖项:linux-generic

jer*_*oen 7 apt dpkg

今天我去找我奶奶,因为她的电脑有一些问题,运行着 Xubuntu 12.04LTS。解决“问题”后(Firefox 设置为全屏……)我照常运行apt-get update && apt-get dist-upgrade以立即更新所有内容。相反,我遇到了一些未正确安装的软件包的错误。所以我跑了dpkg --configure -a。我的猜测是,因为 Firefox 是全屏的,她不知道如何关闭她的计算机,只是简单地关闭了它,可能正是在它安装自动安全更新的时候。dpkg --configure -a然而,运行只给我留下了关于未满足的依赖项的错误消息linux-genericapt-get dist-upgrade再次运行时,它告诉我同样的情况,我应该尝试该-f选项。但是,即使在尝试强制升级时,它仍然不会安装它们。

这是命令的输出(添加 LANG=C 因为默认语言是荷兰语)。

jeroen@Bomma:/home/bomma$ LANG=C sudo apt-get dist-upgrade
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 : Depends: linux-image-generic (= 3.2.0.37.45) but 3.2.0.38.46 is installed
                 Depends: linux-headers-generic (= 3.2.0.37.45) but 3.2.0.38.46 is installed
E: Unmet dependencies. Try using -f.
Run Code Online (Sandbox Code Playgroud)

运行它-f

jeroen@Bomma:/home/bomma$ LANG=C sudo apt-get -f dist-upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
Calculating upgrade... Done
The following packages will be upgraded:
  linux-generic
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1.722 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]?  
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 3.2.0.37.45); however:
  Version of linux-image-generic on system is 3.2.0.38.46.
 linux-generic depends on linux-headers-generic (= 3.2.0.37.45); however:
  Version of linux-headers-generic on system is 3.2.0.38.46.
dpkg: error processing linux-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
    Errors were encountered while processing:
 linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)

我不知道如何解决这个问题(除了快速重新安装她漂亮的默认 xubuntu)?尝试删除并重新安装linux-generic软件包似乎相当冒险,但也许这可以解决问题?

gun*_*ert 11

去除linux-generic不会有任何伤害。它只是一个依赖于linux-image-generic和的“元包” linux-headers-generic。这两个本身就是元包,具体取决于各自的最新图像/标头包。

您可以通过发出apt-cache show linux-generic,apt-cache show linux-image-generic和来亲自查看这一点apt-cache show linux-headers-generic

元包的目的是引入它们所依赖的包,它们根本没有功能。另一方面,删除一个不会删除它的依赖项 - 所以对系统没有危险。

修复了原始问题后,您当然可以linux-generic再次安装。