I've been trying to install on . But I ran into a few problems when trying to install Linux headers.

Before installing anything I ran:

$ apt-get upgrade  
$ apt-get update  
$ apt-get dist-upgrade

and then restarted my computer.

I then used:

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

And got the following errors:

E: Unable to locate package linux-headers-3.18.0-kali1-amd64  
E: Couldn't find any package by regex 'linux-headers-3.18.0-kali1-amd64'  

I used apt-cache search to look for packages with 'linux-headers' in the name and got :

linux-headers-3.18.0-kali3-all  -  All header files for Linux 3.18 (meta-package)
linux-headers-3.18.0-kali3-all-amd64  -  All header files for Linux 3.18 (meta-package)
linux-headers-3.18.0-kali3-amd64 - Header files for Linux 3.18.0-kali3-amd64
linux-headers-3.18.0-kali3-common - Common header files for Linux 3.18.0-kali3
linux-headers-amd64 - Header files for Linux amd64 configuration (meta-package)

I noticed that most of the packages have kali3, whereas I have kali1. First off, what does the difference in numbers mean? And how would I got about installing the headers on my computer?

I've been looking through forums but could find a solution. Any help would be much appreciated.



Try to install one of these headers with the actual corresponding kernel:

$ sudo apt-get install linux-image-3.18.0-kali3-amd64
$ sudo apt-get install linux-headers-3.18.0-kali3-amd64

Now at startup, you should have the two kernels listed. Try the new one. If everything is alright, then uninstall the old one ("kali1") and compile whatever you like with the headers. :)

PS: are you sure you executed all the updates as root?

| improve this answer | |
  • Hey, I did execute all the updates as root. I tried your suggestion, and was able to run both those commands without any problems. However, when I try to run $ apt-get remove linux-image-3.18.0-kali1-amd64, it says its trying to remove the currently installed Kernel. This seems a little sketchy, am I about to brick my system? – James Talarico Jul 16 '15 at 0:02
  • 1
    Reboot first and choose the other kernel THEN you can uninstall the first. – user123418 Jul 16 '15 at 0:20
  • When I run $ grep menuentry /boot/grub/grub.cfg I can see "menuentry 'Kali GNU/Linux, with Linux 3.18.0-kali3-amd64'" in the list. However, when I boot to grub the option is not available. I've also tried using: $ grub-reboot "Kali GNU/Linux, with Linux 3.18.0-kali3-amd64" $ update-grub and then restarting. How exactly do I boot to the new Kernel? – James Talarico Jul 16 '15 at 1:05
  • If it's in grub.cfg, it's present at boot. There is no other way, this is what grub is reading to provide the list. It can be the default kernel or there is a "Advance Ubuntu" (or so) menu entry... – user123418 Jul 16 '15 at 1:08
  • 1
    So I figured out the problem. Turns out I had to run $ update-grub from my Ubuntu partition. – James Talarico Jul 16 '15 at 15:31

This problem I also met several times recently, my solution is: vim /etc/apt/.sources.list deb http://security.debian.org/ wheezy/updates main contrib deb-src http://security.debian.org/ squeeze/updates main contrib non-free :wq $ apt-get autoclean && apt-get update $ apt-get install -y linux-headers-$(uname -r) Or you can try $ apt-cache search linux-headers-$(uname -r) $ sudo apt-get install linux-headers-$(uname -r)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.