在 lubuntu 20.04 中安装最新的 Linux 映像时出现问题

在 lubuntu 20.04 中安装最新的 Linux 映像时出现问题

无法正常启动,我需要使用以前的 Linux 映像通过高级选项进行启动。当我尝试更新它时系统返回此信息:

Running post-installation trigger dpkg-exec
Preparing installation of memtest86+
Unpacking memtest86+
Installing memtest86+
Configuring linux-image-5.4.0-47-generic
Error Resume:
Eror Code: error-package-manager-failed
Package operation failed
The installation or removal of a software package failed.
Error Detail: installArchives() failed: Preconfiguring packages ...
Preconfiguring packages ...
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 276712 files and directories currently installed.)
Preparing to unpack .../memtest86+_5.01-3.1ubuntu2.1_amd64.deb ...
Unpacking memtest86+ (5.01-3.1ubuntu2.1) over (5.01-3.1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/memtest86+_5.01-3.1ubuntu2.1_amd64.deb (--unpack):
 unable to make backup link of './boot/memtest86+.bin' before installing new version: Operation not permitted
Errors were encountered while processing:
 /var/cache/apt/archives/memtest86+_5.01-3.1ubuntu2.1_amd64.deb
Setting up linux-image-5.4.0-47-generic (5.4.0-47.51) ...
Failed to create symlink to vmlinuz-5.4.0-42-generic: Operation not permitted at /usr/bin/linux-update-symlinks line 64.
dpkg: error processing package linux-image-5.4.0-47-generic (--configure):
 installed linux-image-5.4.0-47-generic package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-5.4.0-47-generic; however:
  Package linux-image-5.4.0-47-generic is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-modules-extra-5.4.0-47-generic:
 linux-modules-extra-5.4.0-47-generic depends on linux-image-5.4.0-47-generic | linux-image-unsigned-5.4.0-47-generic; however:
  Package linux-image-5.4.0-47-generic is not configured yet.
  Package linux-image-unsigned-5.4.0-47-generic is not installed.

dpkg: error processing package linux-modules-extra-5.4.0-47-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 5.4.0.47.50); however:
  Package linux-image-generic is not configured yet.

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured

Package operation failed
The installation or removal of a software package failed.
Eror Code: error-package-manager-failed
Package operation failed
The installation or removal of a software package failed.
Error Detail: installArchives() failed: Preconfiguring packages ...
Preconfiguring packages ...
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 276712 files and directories currently installed.)
Preparing to unpack .../memtest86+_5.01-3.1ubuntu2.1_amd64.deb ...
Unpacking memtest86+ (5.01-3.1ubuntu2.1) over (5.01-3.1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/memtest86+_5.01-3.1ubuntu2.1_amd64.deb (--unpack):
 unable to make backup link of './boot/memtest86+.bin' before installing new version: Operation not permitted
Errors were encountered while processing:
 /var/cache/apt/archives/memtest86+_5.01-3.1ubuntu2.1_amd64.deb
Setting up linux-image-5.4.0-47-generic (5.4.0-47.51) ...
Failed to create symlink to vmlinuz-5.4.0-42-generic: Operation not permitted at /usr/bin/linux-update-symlinks line 64.
dpkg: error processing package linux-image-5.4.0-47-generic (--configure):
 installed linux-image-5.4.0-47-generic package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-5.4.0-47-generic; however:
  Package linux-image-5.4.0-47-generic is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-modules-extra-5.4.0-47-generic:
 linux-modules-extra-5.4.0-47-generic depends on linux-image-5.4.0-47-generic | linux-image-unsigned-5.4.0-47-generic; however:
  Package linux-image-5.4.0-47-generic is not configured yet.
  Package linux-image-unsigned-5.4.0-47-generic is not installed.

dpkg: error processing package linux-modules-extra-5.4.0-47-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 5.4.0.47.50); however:
  Package linux-image-generic is not configured yet.

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured

Package operation failed
The installation or removal of a software package failed.

答案1

我认为关键点是:

unable to make backup link of './boot/memtest86+.bin' before installing new version: Operation not permitted

Failed to create symlink to vmlinuz-5.4.0-42-generic: Operation not permitted at /usr/bin/linux-update-symlinks line 64

您可能受到以下错误的影响:https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1318951

如果您的 /boot 分区是 vfat 类型,则错误消息“操作不允许”会造成误导。更好的解释是“操作无法实现,因为文件系统不支持”;-)。运行mount以检查您的 /boot 分区的文件系统类型。

解决方案是禁用符号链接。编辑文件/etc/kernel-img.conf(文件可能不存在,在这种情况下只需创建它)并设置以下选项:

do_symlinks = no
no_symlinks = yes

答案2

对于某些人(包括我自己)来说,编辑的解决方法/etc/kernel-img.conf不再有效。令人惊讶的是,只需卸载并重新安装 memtest 就可以了,因为它不会尝试备份现有文件。每次需要升级时可能需要执行此操作,直到他们修复该错误。

# apt-get remove memtest86+
# apt-get install memtest86+

相关内容