PDA

View Full Version : Kernel headers problem



Philly
2013-05-12, 06:53
Hey guys,

My problem is when i try to update the kernel headers, i get the following;


root@localhost:~# 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-3.7-trunk-686-pae
E: Couldn't find any package by regex 'linux-headers-3.7-trunk-686-pae'


anyone have a solution for me?:confused:

g0tmi1k
2013-05-12, 08:21
Did you do update before?


apt-get update


Also check to make sure your source file is correct:


Kali users should have these entries in their /etc/apt/sources.list file:


deb http://http.kali.org/kali kali main contrib non-free
deb http://security.kali.org/kali-security kali/updates main contrib non-free


Source: http://docs.kali.org/frequently-asked-questions

Philly
2013-05-12, 08:27
Yeah i added a few more update sources, done a apt-get update, fixed the problem.

was tough to find for a must needed fix for Kali.

sunnynv
2013-05-12, 11:27
Hi,

I am Sunny...new to this group
Even i was facing the same issue
Trying to install VMWare on Kali ....it says kernel headers for version 3.7-trunk-686-pae not found....tried a lot to get in and finally found the above mentioned cmd
apt-get install linux-headers-`uname -r`....................which doesn't fetch expected output

Philly
2013-05-15, 07:03
Ive done two installs;

One laptop: i updated only kernel headers, i can log off properly (no blank black screen and i cant do anything)

One computer: updated all updates, inc kernel headers, cant log off properly. i get a black screen, no login line.

Why is the first release of this so buggy & doesn't include sources for kernel updates?

wint3rminate1
2013-07-29, 01:46
Hey guys,

My problem is when i try to update the kernel headers, i get the following;


root@localhost:~# 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-3.7-trunk-686-pae
E: Couldn't find any package by regex 'linux-headers-3.7-trunk-686-pae'


anyone have a solution for me?:confused:

Hi Philly, i had same problem like you but i tried to do what g0tmi1k said and it works..


Did you do update before?


apt-get update


Also check to make sure your source file is correct:

Source: http://docs.kali.org/frequently-asked-questions

hi g0tmi1k, i tried what you said and it works... Thanks :D

Bryan
2014-01-10, 08:10
I've run across this same issue, however I've followed all the steps listed in this thread, and still receive the same error. I've visted the faq page and added all the deb and deb-src listings, ran the apt-get update, but still can't get guest additions to load correctly.


root@kali:~# apt-get install -y linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-3.7-trunk-686-pae
E: Couldn't find any package by regex 'linux-headers-3.7-trunk-686-pae'


Any other ideas?

lee_can
2014-01-10, 09:35
I have tried the above, but doesnt work for me.
The 2 links below is

root@E33:~# cat /etc/apt/sources.list
deb http://http.kali.org/kali kali main contrib non-free
deb http://security.kali.org/kali-security kali/updates main contrib non-free




root@E33:~# apt-get update
Hit http://http.kali.org kali Release.gpg
Hit http://security.kali.org kali/updates Release.gpg
Hit http://http.kali.org kali Release
Hit http://security.kali.org kali/updates Release
Get:1 http://http.kali.org kali/main amd64 Packages [8,424 kB]
Get:2 http://security.kali.org kali/updates/main amd64 Packages [143 kB]
Hit http://http.kali.org kali/contrib amd64 Packages
Hit http://security.kali.org kali/updates/contrib amd64 Packages
Hit http://security.kali.org kali/updates/non-free amd64 Packages
Hit http://http.kali.org kali/non-free amd64 Packages
Ign http://http.kali.org kali/contrib Translation-en_US
Ign http://security.kali.org kali/updates/contrib Translation-en_US
Ign http://security.kali.org kali/updates/contrib Translation-en
Ign http://http.kali.org kali/contrib Translation-en
Ign http://security.kali.org kali/updates/main Translation-en_US
Ign http://http.kali.org kali/main Translation-en_US
Ign http://security.kali.org kali/updates/main Translation-en
Ign http://http.kali.org kali/main Translation-en
Ign http://security.kali.org kali/updates/non-free Translation-en_US
Ign http://http.kali.org kali/non-free Translation-en_US
Ign http://security.kali.org kali/updates/non-free Translation-en
Ign http://http.kali.org kali/non-free Translation-en
Fetched 2 B in 22s (0 B/s)
W: Failed to fetch gzip:/var/lib/apt/lists/partial/http.kali.org_kali_dists_kali_main_binary-amd64_Packages Hash Sum mismatch

W: Failed to fetch gzip:/var/lib/apt/lists/partial/security.kali.org_kali-security_dists_kali_updates_main_binary-amd64_Packages Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.
root@E33:~#



So, linux-headers-3.7-trunk-amd64 cannot be installed


root@E33:~# 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-3.7-trunk-amd64
E: Couldn't find any package by regex 'linux-headers-3.7-trunk-amd64'
root@E33:~#


Any idea?

lee_can
2014-01-12, 21:37
I have change the link below with its mirror:
deb http://http.kali.org/kali kali main contrib non-free
deb http://security.kali.org/kali-security kali/updates main contrib non-free

so the apt-get update works fine without any problem, but still Couldn't find any package by regex 'linux-headers-3.7-trunk-amd64'

No any moderator for Kali can advise or give us a hint?
This issue should be fixed before anything I think.

Regards

curemymind
2014-01-12, 22:24
This is what I've done.

apt-get update
everything updated just fine
apt-get upgrade
everything upgraded
apt-get install linux-headers-$(uname -r)
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-3.7-trunk-686-pae
E: Couln't find any package by regex 'linux-headers-3.7-trunk-686-pae'

The source list is fine and does have these two
deb http://http.kali.org/kali kali main contrib non-free
deb http://security.kali.org/kali-security kali/updates main contrib non-free
So what I did was search if any was in the cache.
apt-cache search linux-headers
linux-headers-3.12-kalil-484 - Header files for linux 3.12-kalil-486
linux-headers-3.12-kalil686-pae - header files for linux 3.12-kalil-686-pae
linux-headers-3.12-kalil-al - all headr files for Linux 3.12 (meta-package)
linux-headers-3.12-kalil-amd64 - header files for linux 3.12-kalil-amd64
linux-headers-3.12-kalil-common - Common header files for linux 3.12-kalil
linux-headers-3.12-kalil-common-rt - common header files for linux 3.12-kalil-rt
linux-headers-3.12-kalil-rt686-pae - Header files for Linux 3.12-kalil-rt-686-pae
linux-headers-484 - Header files for Linux 486 configuration (meta-package)
linux-headers-amd64 - Header files for linux amd64 configuration (meta-package)
linux-headers-rt-686-pae - Header files for Linux rt-686-pae configuration (meta-package)

Why is it giving me 3.12 when I need 3.7? A bit of help would be awesome.

haxxley
2014-01-13, 17:46
I'm getting exactly the same like curemymind ... sources.list is up to date, but I'm still receiving

E: Unable to locate package linux-headers-3.7-trunk-686-pae
E: Couln't find any package by regex 'linux-headers-3.7-trunk-686-pae'

very annoying :/ ... free hug for a solution :D

maverik35
2014-01-13, 20:59
I belive they were pulled out of the repos. You might want to upgrade the kernel and then install their headers.

Sorry, I belive there is no 3.7 headers.

haxxley
2014-01-14, 17:59
ah ok, thanks for the advice!

i just saw that kali 1.0.6 were recently released and did the following to update :


apt-get update
apt-get dist-upgrade

like they mention at the following URL Kali 1.0.6 Released/ (http://www.kali.org/news/kali-linux-106-released/)

I will give it a try!

lee_can
2014-01-17, 11:24
I will give it a try!

were you able to upgrade to kali 1.06?

maverik35
2014-01-17, 17:08
If you want to upgrade (packages, kernel and drivers), which I strongly belive is the new version, I always do the this in my debian (wheezy backports, testing, sid and kali) computers:

1. aptitude clean (to cleanup all the /var/cache/apt/archives, and avoid some update and gpg KEY problems)
2. Need to have installed in your system:
linux-image-amd64 (for 64bit systems) or the 32-bit image for 32bit systems
linux-headers-amd64 (for 64bit systems or the 32-bit image for 32bit systems)
firmware-linux (for linux free and non-free firmwares to drivers)
This way every aptitude safe-upgrade and full-upgrade will automatically install new kernel if any, new firmwares and new headers according to the new kernel.
3. aptitude safe-upgrade (very important to do this step before any full-upgrade, since this will not remove any package which dependencies are not met by other packages) READ man aptitude.
4. again step 2 in case some package was not safe-upgraded (hardly will happen, but "hardly or 99% is not enough).
5. aptitude full-upgrade (if you are a debianist, you know the dist-upgrade is deprecated but still in use, read the man aptitude).

That's it...At least I never re-install kali every new version, since you will have updated packages and libraries with safe and full upgrades.

Luck.

f0xp
2014-01-19, 16:28
If you want to upgrade (packages, kernel and drivers), which I strongly belive is the new version, I always do the this in my debian (wheezy backports, testing, sid and kali) computers:

1. aptitude clean (to cleanup all the /var/cache/apt/archives, and avoid some update and gpg KEY problems)
2. Need to have installed in your system:
linux-image-amd64 (for 64bit systems) or the 32-bit image for 32bit systems
linux-headers-amd64 (for 64bit systems or the 32-bit image for 32bit systems)
firmware-linux (for linux free and non-free firmwares to drivers)
This way every aptitude safe-upgrade and full-upgrade will automatically install new kernel if any, new firmwares and new headers according to the new kernel.
3. aptitude safe-upgrade (very important to do this step before any full-upgrade, since this will not remove any package which dependencies are not met by other packages) READ man aptitude.
4. again step 2 in case some package was not safe-upgraded (hardly will happen, but "hardly or 99% is not enough).
5. aptitude full-upgrade (if you are a debianist, you know the dist-upgrade is deprecated but still in use, read the man aptitude).

That's it...At least I never re-install kali every new version, since you will have updated packages and libraries with safe and full upgrades.

Luck.

After I do these Steps, my Kali doesn't working. I cant start startx and the Network isn't working. Wlan and Lan.

What can I do ?

maverik35
2014-01-20, 01:12
Did you do exactly the steps?..I did 5 days ago and it runs like a charm. This is the third time I do this...

Any errors reported during safe-upgrade?....

Do you have VM or HDD installation?...Any errors reported after rebooting. Do you get to the grub menu?

Need more info.

f0xp
2014-01-20, 12:35
I did a clean install of Kali 1.06 now.

I try to install Nvidia Drivers for Pyrit but I have a problem with the Linux-Headers.

When I type apt-get install -y linux-headers-$(uname -r)

I get this


root@cray7:~# apt-get install -y linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-3.12-kali1-686-pae
E: Couldn't find any package by regex 'linux-headers-3.12-kali1-686-pae'
root@cray7:~#

lee_can
2014-01-20, 13:20
Any errors reported during safe-upgrade?....


@marverik35
Can you please post the source.list?
I couldn't complete the command aptitude safe-upgradedue to unavailablity for some packages

lee_can
2014-01-23, 14:26
Finally it works by downloading fresh final version and changing the repository to different mirror as per
http://www.blackmoreops.com/2013/11/14/change-repositories-different-mirror/
Thanks to g0tmi1k

carltom46
2014-01-23, 17:19
I did a clean install of Kali 1.06 now.

I try to install Nvidia Drivers for Pyrit but I have a problem with the Linux-Headers.

When I type apt-get install -y linux-headers-$(uname -r)

I get this


root@cray7:~# apt-get install -y linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-3.12-kali1-686-pae
E: Couldn't find any package by regex 'linux-headers-3.12-kali1-686-pae'
root@cray7:~#

I'm getting the exact same problem. A fresh install didn't fix it. I've already tried different sources, but nothing seems to work; any ideas? I will keep trying sources and report back.
Edit:
Apt-cache search even shows that I have 3.12 kernel headers, but they aren't found when I try to install them.

carltom46
2014-01-23, 18:01
I'm getting the exact same problem. A fresh install didn't fix it. I've already tried different sources, but nothing seems to work; any ideas? I will keep trying sources and report back.
Edit:
Apt-cache search even shows that I have 3.12 kernel headers, but they aren't found when I try to install them.

I am getting this in my 3 VM's, along with my main Kali Desktop. A temporary solution for Virtualbox, for example, is to boot into the 3.7 kernel instead of the 3.12, so that the Virtualbox Guest Additions work fine. However, even under the 3.7 kernel, trying to update the kernel headers yields the same result (although the package name now says 3.7, obviously).

@sapiens
2014-01-23, 19:24
Hi, all..

I think my kali disro is upgreaded to the lastest version.

uname -r
3.12-kali1-686-pae

I was succeded to install kernel headers by the following command

apt-get install linux-headers-`uname -r`

Here is the source file content
cat /etc/apt/
deb http://http.kali.org/kali kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free

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

lee_can
2014-01-23, 21:10
carltom46@

try to comment all lines in source.list and insert the line below if you are using 1.06 version:


deb http://ftp.halifax.rwth-aachen.de/kali/ kali main non-free contrib
deb http://ftp.halifax.rwth-aachen.de/kali-security/ kali main non-free contrib

carltom46
2014-01-24, 03:58
Hi, all..

I think my kali disro is upgreaded to the lastest version.

uname -r
3.12-kali1-686-pae

I was succeded to install kernel headers by the following command

apt-get install linux-headers-`uname -r`

Here is the source file content
cat /etc/apt/
deb http://http.kali.org/kali kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free

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


carltom46@

try to comment all lines in source.list and insert the line below if you are using 1.06 version:

I've tried commenting my original sources.list, adding both of these two lines together, as well as adding them in separately, but both times I get the error:



Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers3.12-kali1-amd64
E: Couldn't find any package by regex 'linux-headers3.12-kali1-amd64'

lee_can
2014-01-24, 05:17
Before installing the linux header, did you clean your cache then make apt-get update?

@sapiens
2014-01-24, 08:54
Procceed to install Linux headers after completing apt-get update
Use only the repositories from here http://docs.kali.org/general-use/kali-linux-sources-list-repositories

apt-get clean to clean cache

thenext
2014-01-24, 11:20
Are you running this in a virtual box

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

misterpaul
2014-01-24, 13:01
I am having the exact same problem. I am wondering if it is related to the latest version of Virtual Box? I am running v 4.3.6 r91406. I have tried a half-dozen variants of the sources.list, to no avail. I have run apt-get upgrade and apt-get update before running apt-get install -y linux-headers-$(uname -r).

in my case, it can't locate 'linux-headers-3.7-trunk-amd64'

what other info can I provide to help us figure out why apt can't find the files?

carltom46
2014-01-25, 16:58
Hi, all..

I think my kali disro is upgreaded to the lastest version.

uname -r
3.12-kali1-686-pae

I was succeded to install kernel headers by the following command

apt-get install linux-headers-`uname -r`

Here is the source file content
cat /etc/apt/
deb http://http.kali.org/kali kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free

deb-src http://http.kali.org/kali kali main non-free contrib
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free
I've figured it out. I tried as @sapiens suggested, but it did not work. However, I then did sudo uname -r, copied the kernel name, then did sudo apt-get install linux-headers-'INSERT_KERNEL_NAME_HERE', and it worked perfectly. Thanks for the tip @sapiens; it seems as if the old, apt-get install linux-headers-$(uname -r) doesn't work anymore.

@sapiens
2014-01-26, 09:07
Thanks, for tip. I'm glad that your solution works for you.

emmanneil
2014-01-26, 19:24
I am having same problem , I gave done apt-get update using all repositories , omitting them and leave two in the source file list but I keep getting unable to locate packages error as above posts. Any more news on a fix ? I only want to install cuda

carltom46
2014-01-28, 02:22
I am having same problem , I gave done apt-get update using all repositories , omitting them and leave two in the source file list but I keep getting unable to locate packages error as above posts. Any more news on a fix ? I only want to install cuda

Did you try using apt-get install linux-headers-'INSERT_KERNEL_NAME_HERE', rather than apt-get install linux-headers$(uname -r)?

Edit:
You can find your kernel name by using uname -r.

bulb
2014-01-30, 01:47
Everybody here is the simple solution: in the command line there's a missing space between "headers" and "$"

So try this: apt-get install linux-headers $(uname -r)

jdeca57
2014-01-31, 17:06
I had the same problem and solved it adding deb-src for the security (copy the line and add -src) in /apt/sources.list so:
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free
standard I had the distribution, the source of the distribution and the security updates without source.
And afterwards I did
apt-get install linux-headers-$(uname -r)
so no spaces... ;-)

emmanneil
2014-02-13, 20:45
I had the same problem and solved it adding deb-src for the security (copy the line and add -src) in /apt/sources.list so:
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free
standard I had the distribution, the source of the distribution and the security updates without source.
And afterwards I did
apt-get install linux-headers-$(uname -r)
so no spaces... ;-)

I have tried all the above but still no sucess

this is the output after doing apt-get update and apt-get upgrade

root@kali:/# uname -r
3.7-trunk-686-pae

and

root@kali:/# apt-cache search linux-headers
linux-headers-3.12-kali1-486 - Header files for Linux 3.12-kali1-486
linux-headers-3.12-kali1-686-pae - Header files for Linux 3.12-kali1-686-pae
linux-headers-3.12-kali1-all - All header files for Linux 3.12 (meta-package)
linux-headers-3.12-kali1-all-i386 - All header files for Linux 3.12 (meta-package)
linux-headers-3.12-kali1-amd64 - Header files for Linux 3.12-kali1-amd64
linux-headers-3.12-kali1-common - Common header files for Linux 3.12-kali1
linux-headers-3.12-kali1-common-rt - Common header files for Linux 3.12-kali1-rt
linux-headers-3.12-kali1-rt-686-pae - Header files for Linux 3.12-kali1-rt-686-pae
linux-headers-486 - Header files for Linux 486 configuration (meta-package)
linux-headers-686-pae - Header files for Linux 686-pae configuration (meta-package)
linux-headers-amd64 - Header files for Linux amd64 configuration (meta-package)
linux-headers-rt-686-pae - Header files for Linux rt-686-pae configuration (meta-package)


any ideas?

airfer
2014-04-12, 14:32
Hey guys,

My problem is when i try to update the kernel headers, i get the following;


root@localhost:~# 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-3.7-trunk-686-pae
E: Couldn't find any package by regex 'linux-headers-3.7-trunk-686-pae'


anyone have a solution for me?:confused:



I looked for the solution for a long time , but there is a way that can get the problem solved , the detailed information can be seen in the following URL: http://www.geekyindians.com/content/installing-vbox-guest-additions-kali , the method has been proved effectively.

cmos
2014-04-24, 18:40
I had the same issue. I found the solution here (in the comments) -> http://pantuts.com/2013/03/14/how-to-install-kernel-headers/

jinx says:
July 30, 2013 at 8:15 am

to fix ur error,try the following:
–>add repositories: open the /etc/apt/sources.list file in your favourite text editor as root, and paste the following lines ONLY the one missing from ur source list :
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 and then UPDATE ur system

CleanZombie
2014-09-19, 10:57
To fix this problem all you need to do is open your sources.lst file in LeafPad which is located at /etc/apt/sources.list
then once it is open you need to delete the # in front of deb http://security.kali.org/kali-security kali/updates main contrib non-free

and then paste the following below it:

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

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

Once you have done this save and close LeafPad & open a terminal and type sudo apt-get update

and then

apt-get install build-essential linux-headers-`uname -r`

Problem solved :cool:

i360faceplant
2014-11-21, 20:11
try sudo apt-get upgrade linux-headers

Alix
2015-07-27, 08:39
Check /etc/apt/sourses.lst
Was
deb http://security.kali.org/ kali/updates main contrib non-free
deb-src http://security.kali.org/ kali/updates main contrib non-free
and I received error as described above like
E: Unable to locate package linux-headers-3.0.18-686-pae
E: Couldn't find any package by regex 'linux-headers-3.0.18-686-pae'

Now /etc/apt/sourses.lst is

deb http://security.kali.org/ kali/updates main contrib non-free
deb http://http.kali.org/kali/ kali-current main non-free contrib

deb-src http://security.kali.org/ kali/updates main contrib non-free
deb-src http://http.kali.org/kali kali-current main non-free contrib

and
apt-get install build-essential linux-headers-`uname -r`
work without errors.

zyrill
2015-08-12, 15:12
I can't seem to install the headers for Kali 2.0. What I did was:

# apt-get update
# apt-get upgrade && apt-get dist-upgrade
# apt-get install linux-headers-$(uname -r)
The respone I got was:

Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
E: Paket linux-headers-4.0.0-kali1-amd64 kann nicht gefunden werden.
E: Mittels regulärem Ausdruck »linux-headers-4.0.0-kali1-amd64« konnte kein Paket gefunden werden.
My /etc/apt/sources.list reads:

cat /etc/apt/sources.list
#
deb http://security.kali.org/kali-security/ sana/updates main contrib non-free
deb-src http://security.kali.org/kali-security/ sana/updates main contrib non-free
deb http://repo.kali.org/kali kali-bleeding-edge main

Any ideas?

Botmaster
2015-08-12, 19:41
i have same problem. is there any new source i need to add? because it cant find package for 4.0.0 header
apt-get update && apt-get install -y linux-headers-$(uname -r)
used to work for previous version, but not for kali

Cashiuus
2015-08-13, 01:56
For Kali 2.0, I had the same issue, but it was due to the sources.list not including the http.kali.org entries from a vanilla install using the amd64 ISO. Add these into there and you should be able to locate the package correctly afterwards.

/etc/apt/sources.list:

# Regular Repositories
deb http://http.kali.org/kali sana main non-free contrib
deb http://security.kali.org/kali-security sana/updates main contrib non-free

# Source Repositories
deb-src http://http.kali.org/kali sana main non-free contrib
deb-src http://security.kali.org/kali-security sana/updates main contrib non-free

Then, you can update and install linux-headers:

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

rocketcoder
2015-08-13, 04:54
For Kali 2.0, I had the same issue, but it was due to the sources.list not including the http.kali.org entries from a vanilla install using the amd64 ISO. Add these into there and you should be able to locate the package correctly afterwards.

/etc/apt/sources.list:

# Regular Repositories
deb http://http.kali.org/kali sana main non-free contrib
deb http://security.kali.org/kali-security sana/updates main contrib non-free

# Source Repositories
deb-src http://http.kali.org/kali sana main non-free contrib
deb-src http://security.kali.org/kali-security sana/updates main contrib non-free

Then, you can update and install linux-headers:

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

This worked for me. Thanks for the help!

g0tmi1k
2015-08-13, 09:49
I can't seem to install the headers for Kali 2.0. What I did was:
...SNIP...
My /etc/apt/sources.list reads:

cat /etc/apt/sources.list
#
deb http://security.kali.org/kali-security/ sana/updates main contrib non-free
deb-src http://security.kali.org/kali-security/ sana/updates main contrib non-free
deb http://repo.kali.org/kali kali-bleeding-edge main

Any ideas?


Your source file is wrong. Check: http://docs.kali.org/general-use/kali-linux-sources-list-repositories

AAA
2015-11-12, 15:28
For Kali 2.0, I had the same issue, but it was due to the sources.list not including the http.kali.org entries from a vanilla install using the amd64 ISO. Add these into there and you should be able to locate the package correctly afterwards.

/etc/apt/sources.list:

# Regular Repositories
deb http://http.kali.org/kali sana main non-free contrib
deb http://security.kali.org/kali-security sana/updates main contrib non-free

# Source Repositories
deb-src http://http.kali.org/kali sana main non-free contrib
deb-src http://security.kali.org/kali-security sana/updates main contrib non-free

Then, you can update and install linux-headers:

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

What do I need to do if it says permission denied?

reidamaxia
2015-11-13, 06:33
Hi AAA

Are you root?
Otherwise run the command with "sudo" at the beginning or change to root by tipping "sudo su".. :)

regards, reidamaxia

inj3ct0r
2015-12-12, 17:17
Hi users
I have no problem to install kernel in kali sana
All the above steps did all the things you think what I'm still not installed


root@dhcppc2:~# 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-4.0.0-kali1-amd64
E: Couldn't find any package by regex 'linux-headers-4.0.0-kali1-amd64'
root@dhcppc2:~#

tasoss
2015-12-23, 20:36
hello.brand new installation(version 2).i have added http://docs.kali.org/general-use/kali-linux-sources-list-repositories and still i can't install kernel sources.any ideas?

staticn0de
2015-12-23, 23:08
hello.brand new installation(version 2).i have added http://docs.kali.org/general-use/kali-linux-sources-list-repositories and still i can't install kernel sources.any ideas?

post the result of:



cat /etc/apt/sources.list

tasoss
2015-12-23, 23:39
#

# deb cdrom:[Debian GNU/Linux 2.0 _Sana_ - Official Snapshot amd64 LIVE/INSTALL Binary 20150811-08:02]/ sana contrib main non-free

#deb cdrom:[Debian GNU/Linux 2.0 _Sana_ - Official Snapshot amd64 LIVE/INSTALL Binary 20150811-08:02]/ sana contrib main non-free

deb http://security.kali.org/kali-security/ sana/updates main contrib non-free
deb-src http://security.kali.org/kali-security/ sana/updates main contrib non-free
Original file.And then added


deb-src http://http.kali.org/kali sana main non-free contrib
deb-src http://security.kali.org/kali-security sana/updates main contrib non-free

Thanks!

staticn0de
2015-12-23, 23:43
Original file.And then added



Thanks!

Silly question,

did you run:


apt-get update


After changing your sources.list?

Edit:
Ahh!

Change


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


to (both lines)



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


and run



apt-get update


and try the install again

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

tasoss
2015-12-24, 00:12
Well i changed my sources.list to be exactly like this

deb http://http.kali.org/kali sana main non-free contrib
deb-src http://security.kali.org/kali-security/ sana/updates main contrib non-free

deb-src http://http.kali.org/kali sana main non-free contrib
deb-src http://security.kali.org/kali-security sana/updates main contrib non-free

and now it's working as someone would expect.
So my question is , shoudn't it be the default url in a standard installation or Kali or am i missing something?
Maybe someone should update the faq or something?
BTW merry christmas :)
@staticn0de Thanks man !!!
ps:This exists twice so it can be safely deleted from above: deb-src http://security.kali.org/kali-security sana/updates main contrib non-free

staticn0de
2015-12-24, 00:18
Well i changed my sources.list to be exactly like this


and now it's working as someone would expect.
So my question is , shoudn't it be the default url in a standard installation or Kali or am i missing something?
Maybe someone should update the faq or something?
BTW merry christmas :)
@staticn0de Thanks man !!!

Change your sources file so it contains



deb http://http.kali.org/kali sana main non-free contrib
deb http://security.kali.org/kali-security/ sana/updates main contrib non-free

deb-src http://http.kali.org/kali sana main non-free contrib
deb-src http://security.kali.org/kali-security sana/updates main contrib non-free


Delete all the other lines. You had security deb-src twice.

tasoss
2015-12-24, 00:20
Yes i have just noticed it.
Thanks again.

davidy
2016-01-24, 13:17
hello

finally i resolved this problem by installing linux-headers-4.0.0-kali1-686-pae manually
first, i have downloaded that package (linux-headers-4.0.0-kali1-686-pae_4.0.4-1+kali2_i386.deb). see this link: [/URL]
1167

according to this image, linux-headers-4.0.0-kali1-686-pae_4.0.4-1+kali2_i386.deb depends of 3 others packages:
-linux-headers-4.0.0-kali1-common (= 4.0.4-1+kali2)
-linux-kbuild-4.0
-linux-compiler-gcc-4.9-x86
so with the same link ( [URL="http://http://http.kali.org/kali/pool/main/l/linux/"] (http://http://http.kali.org/kali/pool/main/l/linux/)) i have downloaded linux-headers-4.0.0-kali1-common (= 4.0.4-1+kali2) and inux-compiler-gcc-4.9-x86
and linux-kbuild-4.0 can be downloaded with this link: http://mirror.internode.on.net/pub/kali/pool/main/l/linux-tools/
all i got to go was to just install them with dpkg command like this: dpkg -i package.deb
1170
1171

after that i have installed linux-headers-4.0.0-kali1-686-pae like this:
1169

we can verify that it works with this: apt-get install linux-headers-$(uname -r), like this:
1168

tomasdgs
2016-03-02, 19:55
hello

finally i resolved this problem by installing linux-headers-4.0.0-kali1-686-pae manually
first, i have downloaded that package (linux-headers-4.0.0-kali1-686-pae_4.0.4-1+kali2_i386.deb). see this link: [/URL]
1167



according to this image, linux-headers-4.0.0-kali1-686-pae_4.0.4-1+kali2_i386.deb depends of 3 others packages:
-linux-headers-4.0.0-kali1-common (= 4.0.4-1+kali2)
-linux-kbuild-4.0
-linux-compiler-gcc-4.9-x86
so with the same link ( [URL="http://http://http.kali.org/kali/pool/main/l/linux/"] (http://http://http.kali.org/kali/pool/main/l/linux/)) i have downloaded linux-headers-4.0.0-kali1-common (= 4.0.4-1+kali2) and inux-compiler-gcc-4.9-x86
and linux-kbuild-4.0 can be downloaded with this link: http://mirror.internode.on.net/pub/kali/pool/main/l/linux-tools/
all i got to go was to just install them with dpkg command like this: dpkg -i package.deb
1170
1171

after that i have installed linux-headers-4.0.0-kali1-686-pae like this:
1169

we can verify that it works with this: apt-get install linux-headers-$(uname -r), like this:
1168

AMAZING!!! This worked GREAT!! Thank you!!!!!!

nickbug
2016-08-18, 21:45
Hail folks!!
Im having some similar issues..
i've installed kali on my smartphone using linux deploy (sana release, rolling did not work)
then i upgrade to rolling by updating the sources.list file



#deb http://http.kali.org/kali/ sana main contrib non-free
#deb-src http://http.kali.org/kali/ sana main contrib non-free
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
deb http://security.kali.org/kali-security kali-current/updates main contrib no$
deb-src http://security.kali.org/kali-security kali-current/updates main contri$

after everything dist-upgraded, i run uname -r i get '3.10.49-MPI24.107-56-g735e417'

'apt-cache search linux-header*'

gives me



linux-headers-4.6.0-kali1-all - All header files for Linux 4.6 (meta-package)
linux-headers-4.6.0-kali1-all-armhf - All header files for Linux 4.6 (meta-package)
linux-headers-4.6.0-kali1-armmp - Header files for Linux 4.6.0-kali1-armmp
linux-headers-4.6.0-kali1-armmp-lpae - Header files for Linux 4.6.0-kali1-armmp-lpae
linux-headers-4.6.0-kali1-common - Common header files for Linux 4.6.0-kali1
linux-headers-armmp - Header files for Linux armmp configuration (meta-package)
linux-headers-armmp-lpae - Header files for Linux armmp-lpae configuration (meta-package)
linux-libc-dev-alpha-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-arm64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-armel-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-armhf-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-hppa-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-m68k-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips64el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsel-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-powerpc-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-powerpcspe-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-ppc64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-ppc64el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-s390x-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-sh4-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-sparc64-cross - Linux Kernel Headers for development (for cross-compiling)



and of course 'apt-get install linux-header$(uname -r)' wont work, cause the **** thing dont find the right header...

why am giving all this trouble... i want to install headers so i can install my tplink usb wifi using the dongle cable..

Anyone can gimme a hand on this matter?

Thanks guys!!

javi2017
2016-09-12, 13:58
I have solved, by typing the following:
apt-get install virtualbox-5.1
and then
apt-get -f install