Kernel broken, dpkg: error processing package...

Hello guys,

So I recently got parrot OS and updated all the packages a while ago, I got some questions like what keyboard I used and such and messed up as I couldn’t boot when I restarted as my ramdisk was not enabled or something. So I went to another boot and fixed that.

Now, I am trying apt update and dpkg --configure -a because I couldn’t install some packages like chrome and I always get back the following message or something the same as it:

Building module:
Cleaning build area…
‘make’ -j4 KVER=6.5.0-13parrot1-amd64 KSRC=/lib/modules/6.5.0-13parrot1-amd64/build…(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.5.0-13parrot1-amd64 (x86_64)
Consult /var/lib/dkms/realtek-rtl8188eus/5.3.9~git20230101.f8ead57/build/make.log for more information.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
dkms: autoinstall for kernel: 6.5.0-13parrot1-amd64 failed!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
dpkg: error processing package linux-image-6.5.0-13parrot1-amd64 (–configure):
installed linux-image-6.5.0-13parrot1-amd64 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-headers-amd64
linux-image-6.5.0-13parrot1-amd64

In short terms, my kernel’s package “linux-image-6.5.0-13parrot1-amd64” is broken or not properly installed which I think was because of the things I mentioned earlier.

I don’t know how to reinstal/fix it as when I tried to delete it it said it would basically just delete my OS.

Does anyone understand what is happening and could offer me some help?

try this:

sudo dpkg --configure -a

and let us know what you get.

also, you can try:

sudo apt update && sudo apt full-upgrade

and see what that gets you. I ran into this problem before (rtl8188 module breaking the kernel install) but I believe this problem was fixed in a previous update. This makes me think that your system wasn’t fully updated. You can also try to remove and reinstall the rtl8188 packages (use synaptic and search rtl8188, it’s easier) and see if that fixes things. Basically you seem to have a module that’s breaking kernel updates. As I said earlier, that was fixed (at least for me) on a previous update. I wasn’t able to install updated kernels for a while until they fixed the rtl8188 package that was causing issues (in that case rtl8188au)

It is fixed a while ago, there was a realtek package (rtl8188au) that was corrupted so I had to uninstall it first.

good to hear. Please edit your original post and put [solved] in the beginning of the subject line. Also, posting that you fixed it and how you fixed it would be good as well - to help others that may have the same issue.

I can’t edit my post, there isn’t an edditing butyon anywhere…