sudo apt upgrade 在“dpkg-statoverride:警告:不存在覆盖”后失败

sudo apt upgrade 在“dpkg-statoverride:警告:不存在覆盖”后失败

我最近使用终端 ( do-upgrade-release) 从 ubuntu 16.04 更新到 18.04。安装完成后,当我尝试时sudo apt upgrade,收到以下警告,最终导致错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  linux-image-4.15.0-29-generic linux-image-4.15.0-45-generic
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
11 not fully installed or removed.
Need to get 0 B/15.8 MB of archives.
After this operation, 326 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 351403 files and directories currently installed.)
Preparing to unpack .../linux-image-4.15.0-29-generic_4.15.0-29.31_amd64.deb ...
Unpacking linux-image-4.15.0-29-generic (4.15.0-29.31) over (4.15.0-29.31~16.04.1) ...
/etc/kernel/postrm.d/statoverride:
dpkg-statoverride: warning: no override present
run-parts: /etc/kernel/postrm.d/statoverride exited with return code 2
dpkg: warning: old linux-image-4.15.0-29-generic package post-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
/etc/kernel/postrm.d/statoverride:
dpkg-statoverride: warning: no override present
run-parts: /etc/kernel/postrm.d/statoverride exited with return code 2
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.15.0-29-generic_4.15.0-29.31_amd64.deb (--unpack):
 new linux-image-4.15.0-29-generic package post-removal script subprocess returned error exit status 1
/etc/kernel/postrm.d/statoverride:
dpkg-statoverride: warning: no override present
run-parts: /etc/kernel/postrm.d/statoverride exited with return code 2
dpkg: error while cleaning up:
 new linux-image-4.15.0-29-generic package post-removal script subprocess returned error exit status 1
Preparing to unpack .../linux-image-4.15.0-45-generic_4.15.0-45.48_amd64.deb ...
Unpacking linux-image-4.15.0-45-generic (4.15.0-45.48) over (4.15.0-45.48~16.04.1) ...
/etc/kernel/postrm.d/statoverride:
dpkg-statoverride: warning: no override present
run-parts: /etc/kernel/postrm.d/statoverride exited with return code 2
dpkg: warning: old linux-image-4.15.0-45-generic package post-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
/etc/kernel/postrm.d/statoverride:
dpkg-statoverride: warning: no override present
run-parts: /etc/kernel/postrm.d/statoverride exited with return code 2
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.15.0-45-generic_4.15.0-45.48_amd64.deb (--unpack):
 new linux-image-4.15.0-45-generic package post-removal script subprocess returned error exit status 1
/etc/kernel/postrm.d/statoverride:
dpkg-statoverride: warning: no override present
run-parts: /etc/kernel/postrm.d/statoverride exited with return code 2
dpkg: error while cleaning up:
 new linux-image-4.15.0-45-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-4.15.0-29-generic_4.15.0-29.31_amd64.deb
 /var/cache/apt/archives/linux-image-4.15.0-45-generic_4.15.0-45.48_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

看来该问题与较旧的 Linux 内核有关。我也在其中看到了“16.04”,但我不知道如何解释或修复它。uname -r返回:

4.15.0-88-generic

相关内容