41

After standard apt-get upgrade and reboot now I am getting the following error when I am trying to run apt-get upgrade in 22.04 LTS:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies: grub-efi-amd64-signed : Depends: grub-efi-amd64-bin (= 2.06-2ubuntu7) but 2.06-2ubuntu10 is to be installed E: Broken packages

What happened here?

DisplayName
  • 619
  • 1
  • 6
  • 8
  • There is a (slow) phased upgrade on the grub packages. See what you have installed, what is a candidate. and the phased percentage with apt-cache policy grub-efi-amd64-bin . Of course, you can force things with an explicit install of the package as shown in some answers below. – ubfan1 Nov 03 '22 at 16:19

4 Answers4

75

I had the same issue and the following command did the trick:

sudo apt --only-upgrade install grub-efi-amd64-signed

My guess is that this has something to do with your system not using Secure Boot, as I can see there's a grub-efi package suffixed with unsigned.

ruffCode
  • 851
18

There's a glitch in the upgrade to grub-efi-amd64-signed and grub-efi-amd64-bin, where they both need to be upgraded, but they depend on each other and neither wants to go first. You could wait for Ubuntu to sort it out somehow, but I was able to fix this problem by using:

apt install grub-efi-amd64-bin

...which forces the upgrade of that one package (using the install flag on an already installed package makes it upgrade on its own). Then re-run apt upgrade and you should find everything else flows again.

jrggv
  • 181
10

the methods from ruffCode and jrggv do not work for me. The following code solve my problem

sudo rm /var/lib/dpkg/info/grub*
sudo dpkg --configure -a
Chen Deng-Ta
  • 397
  • 4
  • 11
1

Thanks for hints @ruffCode and @jrggv. It looks like unattended upgrade resolved this issue for me overnight.

DisplayName
  • 619
  • 1
  • 6
  • 8
  • 2
    Hi! Instead of adding an answer to thank users, please upvote the answers that you find useful, which is the Ask Ubuntu way to say "Thanks". Also, since you are the OP of the question, you can also mark the answer that you find more useful as the solution by clicking the gray checkmark next to that answer. Thanks! :) – BeastOfCaerbannog Nov 04 '22 at 12:30
  • 1
    @BeastOfCaerbannog I think this is a distinct answer. It tells us that waiting fixes the problem and explains why – Zanna Nov 04 '22 at 13:34
  • @Zanna My concern is that jrggv also mentions that: "You could wait for Ubuntu to sort it out somehow..." So I'm not sure if this answer here adds something more. – BeastOfCaerbannog Nov 04 '22 at 13:53
  • @BeastOfCaerbannog That's okay - two answers presenting the same idea in substantially different ways. – Zanna Nov 04 '22 at 14:11
  • 1
    Ok, thank you! ;) – BeastOfCaerbannog Nov 04 '22 at 14:24