Couldn find package linux headers

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…

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

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.

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

Читайте также:  Linux изменить доменное имя компьютера

Step 2

After rebooting, open up the terminal and execute the command

It will show you the current version

Step 3

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

Commonly used header files are provided below.

linux-headers-5.15.0-kali3-amd64_5.15.15-1kali2..> 1636384 27-Jan-2022 11:52
linux-headers-5.15.0-kali3-arm64_5.15.15-1kali2..> 1611968 27-Jan-2022 14:51
linux-headers-5.15.0-kali3-armmp-lpae_5.15.15-1..> 1613896 25-Jan-2022 16:05
linux-headers-5.15.0-kali3-armmp_5.15.15-1kali2..> 1613420 25-Jan-2022 16:05
linux-headers-5.15.0-kali3-cloud-amd64_5.15.15-..> 1393012 27-Jan-2022 11:52
linux-headers-5.15.0-kali3-cloud-arm64_5.15.15-..> 1382632 27-Jan-2022 14:51
linux-headers-5.15.0-kali3-common-rt_5.15.15-1k..> 8217788 27-Jan-2022 11:52
linux-headers-5.15.0-kali3-common_5.15.15-1kali..> 9887092 27-Jan-2022 11:52
linux-headers-5.15.0-kali3-marvell_5.15.15-1kal..> 1513064 25-Jan-2022 14:01
linux-headers-5.15.0-kali3-rpi_5.15.15-1kali2_a..> 1495064 25-Jan-2022 14:01
linux-headers-5.15.0-kali3-rt-686-pae_5.15.15-1..> 1630216 25-Jan-2022 14:33
linux-headers-5.15.0-kali3-rt-amd64_5.15.15-1ka..> 1635988 27-Jan-2022 11:52
linux-headers-5.15.0-kali3-rt-arm64_5.15.15-1ka..> 1609136 27-Jan-2022 14:51
linux-headers-5.15.0-kali3-rt-armmp_5.15.15-1ka..> 1613340 25-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.

This will help you successfully install the linux-header.

Источник

Ошибка при установке linux-headers

E: Unable to locate package linux-headers-4.12.0-kali1-amd64
E: Couldn’t find any package by glob ‘linux-headers-4.12.0-kali1-amd64’
E: Couldn’t find any package by regex ‘linux-headers-4.12.0-kali1-amd64’
Сам я еще совсем зеленый новичок, не бейте тапками

sinner67

apt-get update apt-get upgrade apt-get dist-upgrade

BarDimNik

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

Мне система выдала вот такую ошибку

E: Unable to locate package linux-headers-4.12.0-kali1-amd64
E: Couldn’t find any package by glob ‘linux-headers-4.12.0-kali1-amd64’
E: Couldn’t find any package by regex ‘linux-headers-4.12.0-kali1-amd64’
Сам я еще совсем зеленый новичок, не бейте тапками

zed

это нормально для кали
обновись полностью apt-get update && apt-get dist-upgrade
и reboot
далее смотрим версию ядра uname -r
теперь смотрим apt-cache search linux-headers и apt-cache search linux-image на доступность хеадерсов и имеджа в репах
если к примеру у тебя версия используемого ядра совпадает с тем что есть в репах
то можешь выполнять свою команду apt-get install -y dkms linux-headers-$(uname -r)
но в последнее время в кали линукс установленная версия ядра отличается от исходников что содержатся в репозиториях
поэтому идешь на оф сайт

и ищешь 2 файла под свое ядро это
linux-headers******common*****.deb
и
linux-headers*****all*****.deb
(звездочки это твоя версия ядра и разрядность ос)
скачиваешь их и ставишь со всеми необходимыми зависимости и нужными компиляторами( которые при ошибки запуска будут требоваться к установке)
сначала устанавливаешь файл common, потом all
командой dpkg -i linux-headers******common*****.deb (выходит ошибка, смотришь чего не хватает и ставишь ставишь через apt install этот пакет)
после устанавливаешь также linux-headers*****all*****.deb
перезагружаешь ос и командой apt-cache search linux-headers и apt-cache search linux-image видишь только что установленные нами исходники ядра
и вот теперь выполняешь свою команду apt-get install -y dkms linux-headers-$(uname -r)

Читайте также:  Linux mint ssh keys

Источник

Install linux-headers on debian unable to locate package

I am trying to install the linux-headers for my Kernel Version 3.4.61+ and Debian Version 7.1 I typed this Commands:

apt-get update apt-get install linux-headers-$(uname -r) 
E: Unable to locate package linux-headers-3.4.61 E: Couldn't find any package by regex 'linux-headers-3.4.61' 

Use «apt-cache search linux-headers-» to get a list of all available headers, then you can choose one that fits best.

@leeduhem i found the solution. i just typed apt-get -f install after that i tried again with apt-get install linux-headers-3.2.0-4-all voila it worked!

6 Answers 6

Here’s what you may need to do

sudo apt-get update # This will update the repositories list sudo apt-get upgrade # This will update all the necessary packages on your system sudo apt-get dist-upgrade # This will add/remove any needed packages reboot # You may need this since sometimes after a upgrade/dist-upgrade, there are some left over entries that get fixed after a reboot sudo apt-get install linux-headers-$(uname -r) # This should work now 

I did all the things, but still I couldn’t. root@h1:~# apt-get install linux-headers-$(uname -r) Reading package lists. Done Building dependency tree Reading state information. Done E: Unable to locate package linux-headers-5.4.34-1-pve E: Couldn’t find any package by glob ‘linux-headers-5.4.34-1-pve’ E: Couldn’t find any package by regex ‘linux-headers-5.4.34-1-pve’

root@h1:~# apt-get -y install pve-headers Reading package lists. Done Building dependency tree Reading state information. Done E: Unable to locate package pve-headers

Was running into this in Vagrant, and this did the trick! I had to vagrant reload after running these commands.

You could search first, then choose the closest one.

$ apt-cache search linux-headers linux-headers-3.2.0-4-all - All header files for Linux 3.2 (meta-package) linux-headers-3.2.0-4-all-amd64 - All header files for Linux 3.2 (meta-package) linux-headers-3.2.0-4-amd64 - Header files for Linux 3.2.0-4-amd64 

So I can install any one of these three.

Heres my experience with this problem:

I installed Kali Linux from a live memory stick. Whilst installing I didn’t have an internet connection.

This meant that my sources.list file was set to «Default Off-line Install Values». This meant that when installing I was limited to just the packages and data from the memory stick I Initially installed from.

To fix this, you need to change your sources.list (called switching branches):

This opens the sources file

Now at the top of the file paste in the following two lines:

deb http://http.kali.org/kali kali-rolling main non-free contrib deb-src http://http.kali.org/kali kali-rolling main non-free contrib 

Press CTRL + X then Press Y and Enter to save the file.

Читайте также:  Install linux centos server at

Now you can type the following commands to update Kali:

sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade reboot 

And finally, you should now be able to.

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

This is just my unique experience with this error stemming from an offline install. I hope this helps someone else out there.

Источник

Can’t install kernel headers for 5.13.0-37-generic

What should do I to fix this problem? I new to linux, so please explain how to fix it. Update and upgrade.

Hit:1 http://downloads.metasploit.com/data/releases/metasploit-framework/apt lucid InRelease Hit:2 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease Hit:3 http://dl.google.com/linux/chrome/deb stable InRelease Get:4 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB] Hit:5 https://deb.nodesource.com/node_18.x focal InRelease Hit:6 http://ppa.launchpad.net/linuxuprising/java/ubuntu focal InRelease Hit:7 https://repo.pritunl.com/stable/apt focal InRelease Hit:8 http://ppa.launchpad.net/obsproject/obs-studio/ubuntu focal InRelease Get:9 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [970 kB] Get:10 http://archive.ubuntu.com/ubuntu focal/main i386 Packages [718 kB] Get:11 http://archive.ubuntu.com/ubuntu focal/main Translation-en [506 kB] Get:12 http://archive.ubuntu.com/ubuntu focal/main amd64 DEP-11 Metadata [494 kB] Get:13 http://archive.ubuntu.com/ubuntu focal/main DEP-11 48x48 Icons [98,4 kB] Get:14 http://archive.ubuntu.com/ubuntu focal/main DEP-11 64x64 Icons [163 kB] Get:15 http://archive.ubuntu.com/ubuntu focal/main DEP-11 64x64@2 Icons [15,8 kB] Get:16 http://archive.ubuntu.com/ubuntu focal/main amd64 c-n-f Metadata [29,5 kB] Get:17 http://archive.ubuntu.com/ubuntu focal/universe i386 Packages [4 642 kB] Get:18 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [8 628 kB] Get:19 http://archive.ubuntu.com/ubuntu focal/universe Translation-en [5 124 kB] Get:20 http://archive.ubuntu.com/ubuntu focal/universe amd64 DEP-11 Metadata [3 603 kB] Get:21 http://archive.ubuntu.com/ubuntu focal/universe DEP-11 48x48 Icons [3 016 kB] Get:22 http://archive.ubuntu.com/ubuntu focal/universe DEP-11 64x64 Icons [7 794 kB] Get:23 http://archive.ubuntu.com/ubuntu focal/universe DEP-11 64x64@2 Icons [44,3 kB] Get:24 http://archive.ubuntu.com/ubuntu focal/universe amd64 c-n-f Metadata [265 kB] Get:25 http://archive.ubuntu.com/ubuntu focal/restricted i386 Packages [8 112 B] Get:26 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [22,0 kB] Get:27 http://archive.ubuntu.com/ubuntu focal/restricted Translation-en [6 212 B] Get:28 http://archive.ubuntu.com/ubuntu focal/restricted amd64 c-n-f Metadata [392 B] Get:29 http://archive.ubuntu.com/ubuntu focal/multiverse i386 Packages [74,7 kB] Get:30 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [144 kB] Get:31 http://archive.ubuntu.com/ubuntu focal/multiverse Translation-en [104 kB] Get:32 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 DEP-11 Metadata [48,4 kB] Get:33 http://archive.ubuntu.com/ubuntu focal/multiverse DEP-11 48x48 Icons [23,1 kB] Get:34 http://archive.ubuntu.com/ubuntu focal/multiverse DEP-11 64x64 Icons [192 kB] Get:35 http://archive.ubuntu.com/ubuntu focal/multiverse DEP-11 64x64@2 Icons [214 B] Get:36 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 c-n-f Metadata [9 136 B] Fetched 37,0 MB in 10s (3 702 kB/s) Reading package lists. Done Building dependency tree Reading state information. Done All packages are up to date. Reading package lists. Done Building dependency tree Reading state information. Done Calculating upgrade. Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 
> cat /etc/apt/sources.list deb http://archive.ubuntu.com/ubuntu focal main universe restricted multiverse deb-src http://archive.ubuntu.com/ubuntu focal main universe restricted multiverse #Added by software-properties 

Источник

Оцените статью
Adblock
detector