Unable to locate package linux-headers / E: Unable to locate package linux-headers-5.10.0-kali5-amd64
While compiling programs, you may encounter this particular error.
E: Unable to locate package linux-headers-5.10.0-kali5-amd64
I encountered this while compiling a C code.
To fix this, i first updated my Kali machine (v2020.2a).
sudo apt update -y && apt upgrade -y && apt dist-upgrade
Rebooted. Then installed the headers.
sudo apt install linux-headers-$(uname -r)