Installing VMware. Error : Kernel headers for version 4.3.0-kali1-amd64 were not found

32,247

Solution 1

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

Solution 2

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*'
Share:
32,247

Related videos on Youtube

JAAAY
Author by

JAAAY

.

Updated on September 18, 2022

Comments

  • JAAAY
    JAAAY over 1 year

    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
    
  • JAAAY
    JAAAY about 8 years
    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'
  • Luca D'Amico
    Luca D'Amico about 8 years
    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.
  • JAAAY
    JAAAY about 8 years
    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
  • Luca D'Amico
    Luca D'Amico about 8 years
    can you update your question posting your /etc/apt/sources.list ?
  • JAAAY
    JAAAY about 8 years
    Updated the question!
  • Luca D'Amico
    Luca D'Amico about 8 years
    That's strange.. are you sure that the command "sudo apt-get update && sudo apt-get dist-upgrade" worked for you? have you rebooted your VM?
  • JAAAY
    JAAAY about 8 years
    Yes I know it is strange, maybe I will try to reinstall. Ty btw.
  • JAAAY
    JAAAY about 8 years
    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
  • NSPredator
    NSPredator about 8 years
    @JAAAY Try executing the following to try and resolve that error: sudo dpkg-reconfigure -phigh