Kali Linux - Header Install

UNABLE TO LOCATE PACKAGE LINUX-HEADERS | INSTALL Linux Headers KALI 2019

Welcome Fellow Hackers and Tinkerers. In this post, we will share a solution for a Kali Linux Headers Issue that most of us have been facing for years. If you have been playing around with Kali Linux, you might be familiar with some the below mention errors.

“Unable to locate packages “.
E: Unable to locate package linux-headers-4.18.0-kali2-amd64
E: Unable to locate package linux-headers-4.15.0-kali2-amd64
E: Couldn’t find any package by glob ‘linux-headers-4.9.0-kali3-amd64’
E: Couldn’t find any package by regex ‘linux-headers-4.9.0-kali3-amd64’

We have been struggling to install this linux-headers for days but whatever we do, we end up with this error.

Installing Linux Headers

I have a solution for this issue and this worked for almost all my colleagues. Give it a shot!

There are two methods – The Usual Method to install Kali Linux Header and a Manual Method. Here I will explained both.

Method 1 – Installing Linux-Headers using apt-get

First go to this link and Add the correct repositories to the source.list file.

nano /etc/apt/sources.list

Then run this commands in the terminal.

apt update -y && apt upgrade -y && apt dist-upgrade

After that, reboot the system, open up the terminal and run

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

By running that command, it is supposed to install the linux kernel headers but in Kali 2019 it was not working. So I went with Method 2.

Method 2 – Manual Method

Step 1

Like we did in the first method, add proper Kali Linux repo to /etc/apt/sources.list
Then run this commands in the terminal

apt update -y && apt upgrade -y && apt dist-upgrade

Make sure you Reboot after successfully completing the operation

Step 2

After rebooting, open up the terminal and execute the command

uname -r

It will show you the current version

Step 3

Now Download the required header files and install it using the command

dpkg -i packagename.deb

Commonly used header files are provided below.

linux-headers-4.18.0-kali2-all_4.18.10-2kali1_a..>63230810-Oct-2018 02:00
linux-headers-4.18.0-kali2-all_4.18.10-2kali1_i..>63230409-Oct-2018 15:31
linux-headers-4.18.0-kali2-amd64_4.18.10-2kali1..>110332409-Oct-2018 15:30
linux-headers-4.18.0-kali2-arm64_4.18.10-2kali1..>105413209-Oct-2018 16:51
linux-headers-4.18.0-kali2-armmp-lpae_4.18.10-2..>107526010-Oct-2018 02:00
linux-headers-4.18.0-kali2-armmp_4.18.10-2kali1..>107272810-Oct-2018 02:00

If these aren’t the files you are looking for, follow the below links and download any version of header you want.

Get Linux Headers

This will help you successfully install the linux-header.

Leave a Reply

Your email address will not be published. Required fields are marked *