Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to locate package linux-headers-4.15.0-kali2-amd64

Tags:

linux

terminal

I try to run apt-get install linux-headers-$(uname -r) But i get an error.

E: Unable to locate package linux-headers-4.15.0-kali2-amd64
E: Couldnt find any package by glob 'linux-headers-4.15.0-kali2-amd64
E: Couldnt find any package by regex'linux-headers-4.15.0-kali2-amd64

So here is the thing, i change source.list with (https://docs.kali.org/general-use/kali-linux-sources-list-repositories) these repositories(the links). I think my version of kali is doesnt match with the links. When i write apt-cache search linux-headers , my headers seems as linux-headers-4.16.0-kali2-all...

So is there any suggestion? How can i solve this problem ? Or is there any link for the 4.16.0 version?

like image 779
Caner Taşan Avatar asked Jun 08 '18 11:06

Caner Taşan


2 Answers

I had the same problem with kali, and got it working by updating linux-image and linux-headers packages:

apt-get update && apt-get upgrade
apt-cache search linux-image

then search latest linux-image and linux-source packages with the same version. In my case output was

linux-headers-4.17.0-kali1-amd64 - Header files for Linux 4.17.0-kali1-amd64
linux-headers-4.17.0-kali1-cloud-amd64 - Header files for Linux 4.17.0-kali1-cloud-amd64
linux-image-4.17.0-kali1-amd64 - Linux 4.17 for 64-bit PCs
linux-image-4.17.0-kali1-amd64-dbg - Debug symbols for linux-image-4.17.0-kali1-amd64
...

so then I just installed latest versions:

apt-get install linux-headers-4.17.0-kali1-amd64 linux-image-4.17.0-kali1-amd64 -y
reboot
like image 71
thev0id Avatar answered Sep 28 '22 02:09

thev0id


I was able to upgrade to the latest kali version (4.17.0) by running this command:

sudo apt-get install --reinstall linux-image-4.17.0-kali3-amd64
like image 22
Tomer Avatar answered Sep 28 '22 02:09

Tomer