You have a broken/unsupported DKMS module installed that breaks the kernel header installation. Remove it.
$ dkms remove intel-platform-cse-dkms/2023.11.1-36 ** Changed in: linux (Ubuntu) Status: Confirmed => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2054866 Title: package linux-headers-6.5.0-21-generic 6.5.0-21.21 failed to install/upgrade: installed linux-headers-6.5.0-21-generic package post-installation script subprocess returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2054866/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs