1

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 http://http.kali.org/kali kali-rolling main contrib non-free

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

Cybervitexus
  • 291
  • 4
  • 19
user786
  • 3,902
  • 4
  • 40
  • 72
  • The **regex** and **glob** keywords means way how to target specific packages. - Linux kernel 5.9.0 with kali patches in this case. – Cybervitexus Feb 28 '22 at 17:18

2 Answers2

2

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
germangti
  • 957
  • 11
  • 16
  • I like to create linux like small OS and run it on arduino uno. Any thoughts on that. How exactly I will create memory management's. Or how should I proceed. I initially planned some avr core. But what about minimal my own distribution. – user786 Mar 01 '22 at 12:22
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)
Cybervitexus
  • 291
  • 4
  • 19
geek
  • 307
  • 2
  • 10