无法升级 grub-efi-amd64-signed

无法升级 grub-efi-amd64-signed
The following packages have been kept back: grub-efi-amd64-signed

我已经遇到这个错误好几个星期了。有人知道原因吗?

编辑:

sudo apt update
Reading package lists... Done                     
Building dependency tree       
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
sudo apt upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
grub-efi-amd64-signed
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
sudo apt dist-upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
grub-efi-amd64-signed
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

答案1

升级并更新您的存储库包和缓存。运行以下命令:

$ sudo apt update
$ sudo apt upgrade
$ sudo apt dist-upgrade

更新

逐个运行以下命令:

$ sudo apt install --reinstall grub
$ sudo apt install --reinstall grub2-common
$ sudo apt install --reinstall grub-efi-amd64
$ sudo apt install --reinstall grub-efi-amd64-bin
$ sudo apt autoremove
$ sudo apt install grub-efi-amd64-signed

答案2

在 ubuntu 22.04 上刚刚遇到类似的问题:

apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Try Ubuntu Pro beta with a free personal subscription on up to 5 machines.
Learn more at https://ubuntu.com/pro
The following packages have been kept back:
  grub-efi-amd64-bin grub-efi-amd64-signed
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

https://itsfoss.com/following-packages-have-been-kept-back/很好地描述了原因和解决方案:

通常,当您运行 sudo apt update 和 sudo apt upgrade 命令时,它会将所有已安装的软件包更新为可用的较新版本。

但是,如果已安装包的依赖项已发生更改,从而需要安装新包,则已安装包将不会随着系统更新而升级,并且您会看到包被保留的错误。

解决方案是运行

sudo apt install --only-upgrade grub-efi-amd64-bin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  grub-efi-amd64-signed
The following packages will be upgraded:
  grub-efi-amd64-bin grub-efi-amd64-signed
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 1.272 kB of archives.
After this operation, 15,4 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://de.archive.ubuntu.com/ubuntu jammy-updates/main amd64 grub-efi-amd64-signed amd64 1.182~22.04.1+2.06-2ubuntu10 [533 kB]
Get:2 http://de.archive.ubuntu.com/ubuntu jammy-updates/main amd64 grub-efi-amd64-bin amd64 2.06-2ubuntu10 [740 kB]
Fetched 1.272 kB in 0s (3.210 kB/s)         
(Reading database ... 238324 files and directories currently installed.)
Preparing to unpack .../grub-efi-amd64-signed_1.182~22.04.1+2.06-2ubuntu10_amd64.deb ...
Unpacking grub-efi-amd64-signed (1.182~22.04.1+2.06-2ubuntu10) over (1.180+2.06-2ubuntu7) ...
Preparing to unpack .../grub-efi-amd64-bin_2.06-2ubuntu10_amd64.deb ...
Unpacking grub-efi-amd64-bin (2.06-2ubuntu10) over (2.06-2ubuntu7) ...
Setting up grub-efi-amd64-bin (2.06-2ubuntu10) ...
Setting up grub-efi-amd64-signed (1.182~22.04.1+2.06-2ubuntu10) ...
Trying to migrate /boot/efi into esp config
Installing grub to /boot/efi.
Installing for x86_64-efi platform.
Installation finished. No error reported.

答案3

您使用过 Livepatch 吗?这似乎是 Livepatch 的问题。我亲自执行了 apt update、upgra 和 apt-didt upgrade,然后自动删除了所有未使用的库...然后再次运行 Livepatch...似乎已经解决了问题。?

相关内容