Kali Linux - Header Install

Install Linux Headers Kali 2021 | Unable to Locate Package linux-headers-5.14.0-kali1-amd64

How to Install Linux Headers Kali 2021?

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.

The Annoying “Unable to locate package linux-headers”

If you have been playing around with Kali Linux, you might be familiar with some of the below mention errors.

Updated : December 2021

“Unable to locate packages “.
E: linux-headers-5.14.0-kali4-amd64_5.14.16-1kali1-amd64
E: Couldn’t find any package by glob ‘linux-headers-5.14.0-kali2-amd64’
E: Couldn’t find any package by regex ‘linux-headers-5.14.0-kali2-amd64’

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

Setting up Linux Headers in a Nutshell

Time needed: 5 minutes.

How to Install Linux Headers Kali 2021?

  1. Add the right Repositories

  2. Perform an Update and an Upgrade

  3. Method 1

    Directly install Linux Headers

  4. Method 2

    Download and manually install Linux Headers

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 explain 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 these 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-5.14.0-kali4-amd64_5.14.16-1kali1..>160489205-Nov-2021 14:20
linux-headers-5.14.0-kali4-arm64_5.14.16-1kali1..>157762805-Nov-2021 14:28
linux-headers-5.14.0-kali4-armmp-lpae_5.14.16-1..>158115205-Nov-2021 14:54
linux-headers-5.14.0-kali4-armmp_5.14.16-1kali1..>158049605-Nov-2021 14:54
linux-headers-5.14.0-kali4-cloud-amd64_5.14.16-..>136181605-Nov-2021 14:20
linux-headers-5.14.0-kali4-cloud-arm64_5.14.16-..>134975605-Nov-2021 14:28
linux-headers-5.14.0-kali4-common_5.14.16-1kali..>978932805-Nov-2021 14:20
linux-headers-5.14.0-kali4-marvell_5.14.16-1kal..>148305205-Nov-2021 14:11
linux-headers-5.14.0-kali4-rpi_5.14.16-1kali1_a..>146428805-Nov-2021 14:11
linux-headers-5.15.0-kali2-686-pae_5.15.5-1kali..>160829610-Dec-2021 18:37
linux-headers-5.15.0-kali2-686_5.15.5-1kali1_i3..>160976810-Dec-2021 18:37
linux-headers-5.15.0-kali2-amd64_5.15.5-1kali1_..>161444410-Dec-2021 18:48
linux-headers-5.15.0-kali2-arm64_5.15.5-1kali1_..>158970410-Dec-2021 19:19
linux-headers-5.15.0-kali2-armmp-lpae_5.15.5-1k..>159143210-Dec-2021 18:58
linux-headers-5.15.0-kali2-armmp_5.15.5-1kali1_..>159092010-Dec-2021 18:58
linux-headers-5.15.0-kali2-cloud-amd64_5.15.5-1..>137098010-Dec-2021 18:48
linux-headers-5.15.0-kali2-cloud-arm64_5.15.5-1..>136047610-Dec-2021 19:19
linux-headers-5.15.0-kali2-common-rt_5.15.5-1ka..>819516410-Dec-2021 18:48
linux-headers-5.15.0-kali2-common_5.15.5-1kali1..>986345610-Dec-2021 18:48
linux-headers-5.15.0-kali2-marvell_5.15.5-1kali..>149076410-Dec-2021 17:11
linux-headers-5.15.0-kali2-rpi_5.15.5-1kali1_ar..>147303610-Dec-2021 17:11
linux-headers-5.15.0-kali2-rt-686-pae_5.15.5-1k..>160831610-Dec-2021 18:37
linux-headers-5.15.0-kali2-rt-amd64_5.15.5-1kal..>161421610-Dec-2021 18:48
linux-headers-5.15.0-kali2-rt-arm64_5.15.5-1kal..>158696410-Dec-2021 19:19
linux-headers-5.15.0-kali2-rt-armmp_5.15.5-1kal..>159096410-Dec-2021 18:58

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

Get Linux Headers

This will help you successfully install the linux-header.

Similar Posts

Leave a Reply

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