How to add the proper repository information to Kali Linux to install kernel headers.

Installing the kernel headers for Kali Linux allows the installation of Virtualbox Guest Additions and other software that relies upon the kernel headers, but the /etc/apt/sources.lst is not filled out by default.

Paste this code into the /etc/apt/sources.lst at the bottom of the file.

deb http://http.kali.org/ /kali main contrib non-free
deb http://http.kali.org/ /wheezy main contrib non-free
deb http://http.kali.org/kali kali-dev main contrib non-free
deb http://http.kali.org/kali kali-dev main/debian-installer
deb-src http://http.kali.org/kali kali-dev main contrib non-free
deb http://http.kali.org/kali kali main contrib non-free
deb http://http.kali.org/kali kali main/debian-installer
deb-src http://http.kali.org/kali kali main contrib non-free
deb http://security.kali.org/kali-security kali/updates main contrib non-free
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free
deb http://repo.kali.org/kali kali-bleeding-edge main

Save the file then run apt-get update; apt-get upgrade to update all installed packages.

Credits to: http://pantuts.com/2013/03/14/how-to-install-kernel-headers/.

This fixed the Kali Linux problems and allowed updating the operating system packages.

Then you can run this command to install the kernel headers:

apt-get update; apt-get install -y linux-headers-$(uname -r)

No comments have been made. Use this form to start the conversation :)

Leave a Reply