Linux

Install Linux Headers Kali 2022 | Unable to Locate Package linux-headers-5.4.0-kali3-amd64

How to Install Linux Headers Kali 2022?

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 the below mention errors.

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

We have been struggling to install these 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 2022?

  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 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 them using the command

dpkg -i packagename.deb

Commonly used header files are provided below.

linux-headers-5.15.0-kali3-amd64_5.15.15-1kali2..>163638427-Jan-2022 11:52
linux-headers-5.15.0-kali3-arm64_5.15.15-1kali2..>161196827-Jan-2022 14:51
linux-headers-5.15.0-kali3-armmp-lpae_5.15.15-1..>161389625-Jan-2022 16:05
linux-headers-5.15.0-kali3-armmp_5.15.15-1kali2..>161342025-Jan-2022 16:05
linux-headers-5.15.0-kali3-cloud-amd64_5.15.15-..>139301227-Jan-2022 11:52
linux-headers-5.15.0-kali3-cloud-arm64_5.15.15-..>138263227-Jan-2022 14:51
linux-headers-5.15.0-kali3-common-rt_5.15.15-1k..>821778827-Jan-2022 11:52
linux-headers-5.15.0-kali3-common_5.15.15-1kali..>988709227-Jan-2022 11:52
linux-headers-5.15.0-kali3-marvell_5.15.15-1kal..>151306425-Jan-2022 14:01
linux-headers-5.15.0-kali3-rpi_5.15.15-1kali2_a..>149506425-Jan-2022 14:01
linux-headers-5.15.0-kali3-rt-686-pae_5.15.15-1..>163021625-Jan-2022 14:33
linux-headers-5.15.0-kali3-rt-amd64_5.15.15-1ka..>163598827-Jan-2022 11:52
linux-headers-5.15.0-kali3-rt-arm64_5.15.15-1ka..>160913627-Jan-2022 14:51
linux-headers-5.15.0-kali3-rt-armmp_5.15.15-1ka..>161334025-Jan-2022 16:05

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.

Jithin Sanal

Recent Posts

Transform Your Trash into Treasure: 10 Genius Ways to Reuse Old Electronics!

Discover creative ways to recycle old electronics into new, useful gadgets. Turn your electronic waste…

3 weeks ago

Not Just for Lights – Top 10 LED Projects That Will Shock You!

Explore the top 10 advanced LED projects that go beyond basic lighting. Perfect for electronics…

3 weeks ago

Revolutionizing PCB Fabrication: How UV Resin is Redefining the Art of Circuit Board Design

The integration of UV resin into the PCB production process represents a great achievement and…

2 months ago

Unlock the Secrets to Thriving in Electronics Engineering: A Must-Read Guide for Aspiring Engineers

Discover essential tips for electronics engineering graduates to gain practical experience, from internships to DIY…

2 months ago

Beginners Beware: Must-Have Electronics Tools for Beginners in 2024

Learn essential tips on setting up your workspace, choosing the right tools, and starting your…

3 months ago

2024 Electronics: Top Electronics Trends and Innovations

The electronics sector is about to undergo a revolutionary period that will be characterized by…

3 months ago