I recently have been getting Package Operation Failure when I try to do OS Updates. Sadly, I am not told what Package is failing. I then try the gui OS Updates and it then works just fine.
So I try this: sudo apt update & sudo apt upgrade and I get this:
mg@MGDesktopUnity:~$ sudo apt update & sudo apt upgrade
[sudo] password for mg:
[sudo] password for mg:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following upgrades have been deferred due to phasing:
gnome-control-center gnome-control-center-data gnome-control-center-faces qemu-block-extra
qemu-system-common qemu-system-data qemu-system-gui qemu-system-modules-opengl
qemu-system-modules-spice qemu-system-x86 qemu-utils
The following packages will be upgraded:
alsa-ucm-conf apport apport-core-dump-handler apport-gtk google-chrome-stable libinput-bin
libinput10 python3-apport python3-problem-report
9 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
2 not fully installed or removed.
Need to get 141 MB of archives.
After this operation, 212 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://dl.google.com/linux/chrome-stable/deb stable/main amd64 google-chrome-stable amd64 151.0.7922.108-1 [140 MB]
Get:2 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 python3-problem-report all 2.28.3-0ubuntu0.1 [26.5 kB]
Get:3 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 python3-apport all 2.28.3-0ubuntu0.1 [93.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 apport-core-dump-handler all 2.28.3-0ubuntu0.1 [19.2 kB]
Get:5 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 apport all 2.28.3-0ubuntu0.1 [85.3 kB]
Get:6 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 alsa-ucm-conf all 1.2.10-1ubuntu5.14 [70.2 kB]
Get:7 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 apport-gtk all 2.28.3-0ubuntu0.1 [9,746 B]
Get:8 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libinput-bin amd64 1.25.0-1ubuntu3.6 [23.2 kB]
Get:9 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libinput10 amd64 1.25.0-1ubuntu3.6 [133 kB]
Fetched 141 MB in 49s (2,858 kB/s)
(Reading database ... 408814 files and directories currently installed.)
Preparing to unpack .../0-python3-problem-report_2.28.3-0ubuntu0.1_all.deb ...
Unpacking python3-problem-report (2.28.3-0ubuntu0.1) over (2.28.2-0ubuntu0.1) ...
Preparing to unpack .../1-python3-apport_2.28.3-0ubuntu0.1_all.deb ...
Unpacking python3-apport (2.28.3-0ubuntu0.1) over (2.28.2-0ubuntu0.1) ...
Preparing to unpack .../2-apport-core-dump-handler_2.28.3-0ubuntu0.1_all.deb ...
Unpacking apport-core-dump-handler (2.28.3-0ubuntu0.1) over (2.28.2-0ubuntu0.1) ...
Preparing to unpack .../3-apport_2.28.3-0ubuntu0.1_all.deb ...
Unpacking apport (2.28.3-0ubuntu0.1) over (2.28.2-0ubuntu0.1) ...
Preparing to unpack .../4-google-chrome-stable_151.0.7922.108-1_amd64.deb ...
Unpacking google-chrome-stable (151.0.7922.108-1) over (151.0.7922.75-1) ...
Preparing to unpack .../5-alsa-ucm-conf_1.2.10-1ubuntu5.14_all.deb ...
Unpacking alsa-ucm-conf (1.2.10-1ubuntu5.14) over (1.2.10-1ubuntu5.13) ...
Preparing to unpack .../6-apport-gtk_2.28.3-0ubuntu0.1_all.deb ...
Unpacking apport-gtk (2.28.3-0ubuntu0.1) over (2.28.2-0ubuntu0.1) ...
Preparing to unpack .../7-libinput-bin_1.25.0-1ubuntu3.6_amd64.deb ...
Unpacking libinput-bin (1.25.0-1ubuntu3.6) over (1.25.0-1ubuntu3.5) ...
Preparing to unpack .../8-libinput10_1.25.0-1ubuntu3.6_amd64.deb ...
Unpacking libinput10:amd64 (1.25.0-1ubuntu3.6) over (1.25.0-1ubuntu3.5) ...
Setting up google-chrome-stable (151.0.7922.108-1) ...
Setting up alsa-ucm-conf (1.2.10-1ubuntu5.14) ...
Setting up python3-problem-report (2.28.3-0ubuntu0.1) ...
Setting up linux-headers-7.0.0-28-generic (7.0.0-28.28~24.04.1) ...
/etc/kernel/header_postinst.d/dkms:
* dkms: running auto installation service for kernel 7.0.0-28-generic
Sign command: /usr/bin/kmodsign
Binary update-secureboot-policy not found, modules won't be signed
Building module:
Cleaning build area...
make -j8 KERNELRELEASE=7.0.0-28-generic KVER=7.0.0-28-generic....(bad exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/broadcom-sta-dkms.0.crash'
Error! Bad return status for module build on kernel: 7.0.0-28-generic (x86_64)
Consult /var/lib/dkms/broadcom-sta/6.30.223.271/build/make.log for more information.
dkms autoinstall on 7.0.0-28-generic/x86_64 failed for broadcom-sta(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
* dkms: autoinstall for kernel 7.0.0-28-generic
...fail!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11
dpkg: error processing package linux-headers-7.0.0-28-generic (--configure):
installed linux-headers-7.0.0-28-generic package post-installation script subprocess returned error exit status 11
Setting up python3-apport (2.28.3-0ubuntu0.1) ...
Setting up libinput-bin (1.25.0-1ubuntu3.6) ...
dpkg: dependency problems prevent configuration of linux-headers-generic-hwe-24.04:
linux-headers-generic-hwe-24.04 depends on linux-headers-7.0.0-28-generic; however:
Package linux-headers-7.0.0-28-generic is not configured yet.
dpkg: error processing package linux-headers-generic-hwe-24.04 (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up libinput10:amd64 (1.25.0-1ubuntu3.6) ...
Setting up apport-core-dump-handler (2.28.3-0ubuntu0.1) ...
Setting up apport (2.28.3-0ubuntu0.1) ...
apport-autoreport.service is a disabled or a static unit not running, not starting it.
Setting up apport-gtk (2.28.3-0ubuntu0.1) ...
Processing triggers for bamfdaemon (0.5.6+22.04.20220217-0ubuntu5) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils (0.27-2build1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1.1ubuntu3) ...
Processing triggers for libc-bin (2.39-0ubuntu8.8) ...
Processing triggers for man-db (2.12.0-4build2) ...
Errors were encountered while processing:
linux-headers-7.0.0-28-generic
linux-headers-generic-hwe-24.04
E: Sub-process /usr/bin/dpkg returned an error code (1)
[1]+ Stopped sudo apt update
mg@MGDesktopUnity:~$
Seems like there are some Linux Header issues. How can I repair this?
No. The broadcom-sta module failed to compile against the new kernel headers.
Either you need to find updated module version that will compile against kernel 7.0 or you need to remove this module (but then you may lose wireless when booting the new kernel).
Per this blog post you could try the broadcom-sta version from the 26.04.
@mikegreen8 this is the same issue you had in this thread but with the 7.0.x kernel this time around:
I had this issue back then and again when updating to the 7.0.x kernel recently. I can confirm the above commands found in the link posted by @avb66 was what worked for me again this time around.
FYI: When showing update/upgrade output in the future, please run each command separately. The way you did it hides the apt update output, hiding some important clues to many common problems.
That single & puts the update in the background and starts the upgrade before the update has completed, delayed only by your interaction with sudo. In your example you see from
[1]+ Stopped sudo apt update
that the update running in the background stopped, most likely because it tries to prompt you, so the update never happens. Depending on your timing, this could go wrong quickly or slowly.
What you no doubt want is to make the upgrade contingent on the success of the update with the double &&, i.e.
mg@MGDesktopUnity:~$ sudo apt upgrade
Reading package lists⦠Done
Building dependency tree⦠Done
Reading state information⦠Done
Calculating upgrade⦠Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-headers-7.0.0-28-generic (7.0.0-28.28~24.04.1) ā¦
/etc/kernel/header_postinst.d/dkms:
dkms: running auto installation service for kernel 7.0.0-28-generic
Sign command: /usr/bin/kmodsign
Binary update-secureboot-policy not found, modules wonāt be signed
Building module:
Cleaning build areaā¦
make -j8 KERNELRELEASE=7.0.0-28-generic KVER=7.0.0-28-genericā¦(bad exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: ā/var/crash/broadcom-sta-dkms.0.crashā
Error! Bad return status for module build on kernel: 7.0.0-28-generic (x86_64)
Consult /var/lib/dkms/broadcom-sta/6.30.223.271/build/make.log for more information.
dkms autoinstall on 7.0.0-28-generic/x86_64 failed for broadcom-sta(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
dkms: autoinstall for kernel 7.0.0-28-generic
ā¦fail!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11
dpkg: error processing package linux-headers-7.0.0-28-generic (āconfigure):
installed linux-headers-7.0.0-28-generic package post-installation script subprocess returned error exit status 11
dpkg: dependency problems prevent configuration of linux-headers-generic-hwe-24.04:
linux-headers-generic-hwe-24.04 depends on linux-headers-7.0.0-28-generic; however:
Package linux-headers-7.0.0-28-generic is not configured yet.
dpkg: error processing package linux-headers-generic-hwe-24.04 (āconfigure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
linux-headers-7.0.0-28-generic
linux-headers-generic-hwe-24.04
E: Sub-process /usr/bin/dpkg returned an error code (1)
mg@MGDesktopUnity:~$
This warning means your system is trying to automatically sign DKMS kernel modules for Secure Boot, but it cannot find the tool required to manage Secure Boot keys (update-secureboot-policy).
If Secure Boot is enabled in your BIOS/UEFI, unsigned third-party drivers (like Nvidia, Wi-Fi, or VirtualBox) wonāt load. If Secure Boot is disabled, this warning is harmless and can be safely ignored.
To resolve the warning and enable driver signing, run:
sudo apt update
sudo apt install shim-signed
If Secure Boot is OFF then re-running DKMS or updating the kernel will no longer show the error.
If Secure Boot is On then installing shim-signed will prompt you to set up a MOK (Machine Owner Key) password. You will need to reboot, enter the MOK management screen (a blue screen before Ubuntu loads), choose Enroll MOK, and enter that password toauthorize the keys
This is your error, the module signing is just a transient fallout of it, the broadcom driver does not build, this needs fixing first as @avb66 said aboveā¦
In the UEFI (BIOS) settings, can you access Advanced Settings > Security > Locate OS Type and change it from Windows UEFI Mode to Other OS. *(Setting it to āOther OSā turns off the Secure Boot state)