![安装或配置软件包时出错:无法统计“/boot/vmlinuz-4.4.0-45-generic”](https://linux22.com/image/888063/%E5%AE%89%E8%A3%85%E6%88%96%E9%85%8D%E7%BD%AE%E8%BD%AF%E4%BB%B6%E5%8C%85%E6%97%B6%E5%87%BA%E9%94%99%EF%BC%9A%E6%97%A0%E6%B3%95%E7%BB%9F%E8%AE%A1%E2%80%9C%2Fboot%2Fvmlinuz-4.4.0-45-generic%E2%80%9D.png)
我有 ubuntu 16.04 64b,当我尝试安装软件包或使用时出现一些错误sudo dpkg --configure -a
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 126 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.`
...
Setting up linux-signed-image-4.4.0-45-generic (4.4.0-45.66) ...
cp: cannot stat '/boot/vmlinuz-4.4.0-45-generic': No such file or directory
dpkg: error processing package linux-signed-image-4.4.0-45-generic (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-signed-image-generic:
linux-signed-image-generic depends on linux-signed-image-4.4.0-45-generic; however:
Package linux-signed-image-4.4.0-45-generic is not configured yet.
dpkg: error processing package linux-signed-image-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed-generic:
linux-signed-generic depends on linux-signed-image-generic (= 4.4.0.45.48); however:
Package linux-signed-image-generic is not configured yet.
dpkg: error processing package linux-signed-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because the error message indicates its a followup error from a previous failure.
Setting up liboctomap1.6v5 (1.6.8+dfsg-2.1) ...
Setting up octomap-tools (1.6.8+dfsg-2.1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Errors were encountered while processing:
linux-signed-image-4.4.0-45-generic
linux-signed-image-generic
linux-signed-generic
我努力了:
sudo apt-get update
sudo apt-get autoremove
我遇到了同样的错误。
Dpkg 列表如下:
sudo dpkg --list 'linux-image*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-============================================-===========================-===========================-=============================================================================================
un linux-image <none> <none> (no description available)
rc linux-image-4.4.0-31-generic 4.4.0-31.50 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii linux-image-4.4.0-42-generic 4.4.0-42.62 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii linux-image-4.4.0-45-generic 4.4.0-45.66 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-31-generic 4.4.0-31.50 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii linux-image-extra-4.4.0-42-generic 4.4.0-42.62 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii linux-image-extra-4.4.0-45-generic 4.4.0-45.66 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii linux-image-generic 4.4.0.45.48 amd64 Generic Linux kernel image
iF linux-signed-i 4.4.0-45.66 amd64 Signed kernel image generic iU linux-signed-i 4.4.0.45.48 amd64 Signed Generic Linux kernel image
dpkg -s linux-signed-image-4.4.0-45-generic Package: linux-signed-image-4.4.0-45-generic Status: install ok half-configured Priority: optional Section: utils Installed-Size: 21 Maintainer: Canonical Kernel Team <[email protected]> Architecture: amd64 Source: linux-signed Version: 4.4.0-45.66 Depends: sbsigntool, linux-image-4.4.0-45-generic (= 4.4.0-45.66) Description: Signed kernel image generic A kernel image for generic. This version of it is signed with Canonical's UEFI signing key. Built-Using: linux (= 4.4.0-45.66)
我尝试重新安装该软件包但出现同样的错误:
sudo apt-get -f install linux-signed-image-4.4.0-45-generic ... Setting up linux-signed-image-4.4.0-45-generic (4.4.0-45.66) ... cp: cannot stat '/boot/vmlinuz-4.4.0-45-generic': No such file or directory dpkg: error processing package linux-signed-image-4.4.0-45-generic (--configure): ...
所以我在 linux-signed-image-4.4.0-45-generic 中遇到了问题,因为没有 /boot/vmlinuz-4.4.0-45-generic 文件,所以配置了一半。我猜这是在我使用 boot-repair 修复了 UEFI 启动问题后发生的。我该如何解决?提前致谢
答案1
答案的简短版本;
启动一个你知道运行良好的选定内核,然后检查
$ uname -a
确保保留该版本的内核(上面的 linux-image...)并执行
$ sudo apt-get purge ...
... 在列出其他版本号的软件包上,包括 4.4.0-45 版本(我假设它无法运行/启动)。
清除未使用的版本后,您应该能够重新安装 4.4.0-45,启动它,并可以选择删除以前使用的版本。
我建议保留至少一个非最新版本,(您知道它确实有效)用于安全/备份/修复......
为什么?
我猜是 /boot 上的空间不够了...或者可能是其他地方——无论问题出在哪里,上述操作都应该在相关位置释放一些空间。