我收到了错误消息:The package system is broken
据我所知,我没有使用第三方存储库。根据最近关于类似主题的一些帖子,我查看了其他有类似问题的帖子并尝试:sudo apt-get -f install
结果:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
linux-image-3.11.0-19-generic
Suggested packages:
fdutils linux-lts-saucy-doc-3.11.0 linux-lts-saucy-source-3.11.0
linux-lts-saucy-tools
The following NEW packages will be installed
linux-image-3.11.0-19-generic
0 to upgrade, 1 to newly install, 0 to remove and 28 not to upgrade.
2 not fully installed or removed.
Need to get 0 B/57.3 MB of archives.
After this operation, 154 MB of additional disk space will be used.
Do you want to continue [Y/n]?
表示是
结果:
(Reading database ... 171297 files and directories currently installed.)
Unpacking linux-image-3.11.0-19-generic (from .../linux-image-3.11.0-19-generic_3.11.0-19.33~precise1_i386.deb) ...
This kernel does not support a non-PAE CPU.
dpkg: error processing /var/cache/apt/archives/linux-image-3.11.0-19-generic_3.11.0-19.33~precise1_i386.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-19-generic /boot/vmlinuz-3.11.0-19-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-19-generic /boot/vmlinuz-3.11.0-19-generic
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-3.11.0-19-generic_3.11.0-19.33~precise1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我根本不知道下一步该做什么。
答案1
我的早期 Pentium-m CPU 曾遇到过这个问题,它没有在标志部分报告 PAE /proc/cpuinfo
。
与初始安装一样(在我的情况下是 16.04),您必须在启动时添加“forcepae”内核选项。
最好的方法是将其添加到:/etc/grub.d/10_linux
搜索此行: args="$4"
改成: args="$4 forcepae"
保存然后执行: update-grub
重启后,您的标志部分将出现“pae”,/proc/cpuinfo
更新将生效。它还将保留以供将来更新使用。
这假设您有一个真正的 PAE CPU,例如早期的 Pentium-m,它不报告其 PAE 功能。自 1995 年以来,几乎所有 x86 CPU 都支持 PAE,因此这 99.99% 可能是您的问题。
答案2
根据评论,的输出sudo apt-get autoremove
是,
$ sudo apt-get autoremove
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-image-generic-lts-saucy : Depends: linux-image-3.11.0-19-generic but it is not installed
E: Unmet dependencies. Try using -f.
它清楚地表明该软件包linux-image-generic-lts-saucy
正在尝试下载并安装依赖包,从而在安装这个新内核时linux-image-3.11.0-19-generic
产生错误。This kernel does not support a non-PAE CPU
保留主包 ( linux-image-generic-lts-saucy
) 将解决您的问题。因此,您必须运行以下命令来保留linux-image-generic-lts-saucy
包,
sudo apt-get clean
sudo apt-mark hold linux-image-generic-lts-saucy
最后修复依赖关系,
sudo apt-get install -f
答案3
您使用的是非 PAE CPU,因此您很可能正在升级到不支持 PAE 的内核。升级过程非常智能,因此它不会安装不允许您启动系统的内核,因此安装会失败。
防止这种情况的方法是将您的 CPU 升级为支持 PAE 的 CPU(您应该购买一个新的)或保留该包,正如 Avinash 在他的回答中所解释的那样。