1

Trying to install VMware Player on Kali Rolling (debian Wheezy). When running VMware Player for first time after installation I get:

Error: C header files matching your running kernel were not found. Refer to your distribution's documentation for installation instructions.

When pressing OK I have to enter a manual path for headers. Tried a find command in case something missing.

First error img

Enter manual path img

UPDATE:

/etc/apt/sources.list*

  deb http://http.kali.org/kali kali-rolling main contrib non-free
  deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 201$
  deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 201$
  deb http://download.virtualbox.org/virtualbox/debian wheezy contrib
1

I believe I have a solution for you. Recently I have installed Kali Linux on my machine and I noticed a similar issue. Executing the following sudo apt-get install linux-headers-$(uname -r) will only fetch form the repositories in your sources.list file. Now in my case the repositories that I are available are outdated therefore I resulted to installing the Linux Headers manually by downloading the packages then using dpkg. Here is how accomplished that:

If your system is 32 bit:

1) Wget the following files

 wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.3.4-wily/linux-headers-4.3.4-040304_4.3.4-040304.201601230132_all.deb
 wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.3.4-wily/linux-headers-4.3.4-040304-generic_4.3.4-040304.201601230132_i386.deb
 wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.3.4-wily/linux-image-4.3.4-040304-generic_4.3.4-040304.201601230132_i386.deb

2) Install the following packages by issuing:

sudo dpkg -i linux-headers-4.3.4*.deb linux-image-4.3.4*.deb

3) Reboot your system:

sudo reboot

If your system is 64 bit:

1) Wget the following files

wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.3.4-wily/linux-headers-4.3.4-040304_4.3.4-040304.201601230132_all.deb
wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.3.4-wily/linux-headers-4.3.4-040304-generic_4.3.4-040304.201601230132_amd64.deb
wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.3.4-wily/linux-image-4.3.4-040304-generic_4.3.4-040304.201601230132_amd64.deb

2) Install the following packages by issuing:

sudo dpkg -i linux-headers-4.3.4*.deb linux-image-4.3.4*.deb

3) Reboot your system:

sudo reboot

If you wish to uninstall the header files issue the following:

sudo apt-get remove 'linux-headers-4.3.4*' 'linux-image-4.3.4*'
2
  • Thanks for trying to help bro! Unfortunately it didn't help. Actually when I try to install the packages with dpkg, after a bounch of lines this appears : Errors were encountered while processing: linux-headers-4.3.4-040304-generic
    – JAAAY
    Apr 22 '16 at 1:14
  • @JAAAY Try executing the following to try and resolve that error: sudo dpkg-reconfigure -phigh
    – NSPredator
    Apr 22 '16 at 7:53
0

You need to install kernel headers:

sudo apt-get install linux-headers-$(uname -r)
7
  • sudo apt-get install linux-headers-$(uname -r) --- Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package linux-headers-4.3.0-kali1-amd64 E: Couldn't find any package by glob 'linux-headers-4.3.0-kali1-amd64' E: Couldn't find any package by regex 'linux-headers-4.3.0-kali1-amd64'
    – JAAAY
    Apr 20 '16 at 9:39
  • Uhm.. please use this command: "sudo apt-get update && sudo apt-get dist-upgrade" (without quotes), then reboot and try again the command in my answer. Apr 20 '16 at 9:43
  • Again the same error while running apt-get install linux headers...Actually which of these headers is the one that i need ?? linux-headers-4.4.0-kali1-all linux-headers-4.4.0-kali1-common linux-headers-4.4.0-kali1-all-amd64 linux-headers-amd64 linux-headers-4.4.0-kali1-amd64
    – JAAAY
    Apr 20 '16 at 9:48
  • can you update your question posting your /etc/apt/sources.list ? Apr 20 '16 at 9:52
  • Updated the question!
    – JAAAY
    Apr 20 '16 at 10:04
0

Sorry all, I finally fixed it after some time but forgot to post the answer! When I installed Kali, I din't make the updates so there were a lot of crucial updates pending. I finally solved it by going to Packages Update (from the Menu) and installing the pending update (for me it was >3GBs).

Note : Kali is a rolling distribution so after installation you must check to fetch the latest updates.

UPDATE: I didn't expect this question to become so frequently searched. So what will solve your problems, is type

apt clean && apt update && apt dist-upgrade

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