Cannot find linux-headers-4.3.0-kali-amd64
I'm trying to install the VMware tools in a VMPlayer VM but in a certain point of the installation I need to set the linux-headers path. So I go and try to install it with this command:
apt-get install gcc make linux-headers-$(uname -r)
Then I get the error:
Couldnt find any package by glob 'linux-headers-4.3.0-kali-amd64'
My sources.list file has these sources:
deb http://http.kali.org/kali kali-rolling main contrib non-free deb http://http.kali.org/kali kali main contrib non-free deb http://http.kali.org/kali sana main contrib non-free deb http://http.kali.org/kali-security kali/updates main contrib non-free deb http://http.kali.org/kali-security sana/updates main contrib non-free
I already did and
apt-get updatebefore trying to install the headers. What can I do to download it?
I would upgrade the kernel release version itself instead of trying to install the Linux kernel headers for the old version (4.3.0) of the kernel. Perform the following step after updating the Kali
/etc/apt/sources.listfile with the latest version of the Kali rolling repository:
sudo apt-get update # this pulls the latest packages list from the kali sources repo sudo apt-get -y dist-upgrade # when installing this, you would see the latest kernel # image in the list of packages to be installed,something # like" linux-image-4.5.0-kali1-amd64" reboot # MOST IMPORTANT STEP! make sure you reboot the machine via this cmd OR # shutdown, restart forcefully after completing prev cmds uname -r # check that the kernel release has updated
I think you probably meet this problem that lack of linux headers when you install the VMware Tools.
In fact, there's new way to solve the issue in official Kali website: http://docs.kali.org/general-use/install-vmware-tools-kali-guest.
As the tutorial says, if your version of VMware is after Sept 2015, you can use the following code to install it:
apt-get update apt-get install open-vm-tools-desktop fuse reboot
Then, you may find you can use the VMware Tools and with the linux-headers updating.
To get the required information about the available
linux-headers, run the following command :
apt-cache search linux-headers
You will not see the
linux-headers-4.3.0-kali-amd64because the kali repo is updated , some old packages versions will be removed and the newest will take its place.
You should found the latest
apt-cache search linux-image
Install it e,g:
apt-get install linux-image-4.9.0-kali4-amd64
Reboot your system and install the appropriate
apt-get install linux-headers-4.9.0-kali4-amd64
linux-headerspackages should have the same version.
There is an alternate solution - one can attempt to manually install the older packages without upgrading the kernel. It is a bit elaborate, but I have tried this with Kali Linux 2016.2 i386, and the following kernel:
$ uname -a Linux hacker 4.6.0-kali1-686-pae #1 SMP Debian 4.6.4-1kali1 (2016-07-21) i686 GNU/Linux
I searched for linux-headers-4.6.0-kali1-686-pae online, and found that .deb packages for the linux kernel headers are located here via Google search. Then, I installed the following packages (linux-headers and its dependencies) for i386 - you can install the appropriate versions based on your architecture:
$ dpkg -i linux-kbuild-4.6_4.6.4-1kali1_i386.deb $ dpkg -i linux-headers-4.6.0-kali1-common_4.6.4-1kali1_i386.deb $ dpkg -i linux-headers-4.6.0-kali1-all-i386_4.6.4-1kali1_i386.deb $ dpkg -i linux-headers-4.6.0-kali1-686-pae_4.6.4-1kali1_i386.deb
After installation, just reboot and the kernel headers should be available.