Installing Kernel Headers Packages Missing Error

Installing Kernel Headers Packages Missing Error

I am trying to install kernel-headers but getting this error

E: Unable to locate package linux-headers-5.9.0-kali1-amd64

E: Couldn't find any package by glob 'linux-headers-5.9.0-kali1-amd64'

E: Couldn't find any package by regex 'linux-headers-5.9.0-kali1-amd64'

I have updated and uncommented this line in sources.list

deb-src kali-rolling main contrib non-free

but errors thats can't locate regex or glob. what I am missing?

1

2 Answers

Here's what you may need to do

sudo apt-get update # This will update the repositories list
sudo apt-get upgrade # This will update all the necessary packages on your system
sudo apt-get dist-upgrade # This will add/remove any needed packages
reboot # You may need this since sometimes after a upgrade/dist-upgrade, there are some left over entries that get fixed after a reboot
sudo apt-get install linux-headers-$(uname -r) # This should work now
1

from what am guessing linux-headers-5.9.0 is not available in the kali repository.

you can always use apt-cache search linux-headers to know if it available but to update to the latest linux headers

sudo apt-get update

sudo apt-get dist-upgrade

then search for Linux-headers available using apt search Linux-headers.

so you install the latest version using

sudo apt-get install -y linux-headers-$(uname -r)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.