4

I have problem to install linux-headers in Raspbian on my RPi2. My kernel version is 4.1.17-v7+. I can't find the linux-headers package with apt-get.

Greenonline
  • 2,740
  • 4
  • 23
  • 36
K_Mil0
  • 41
  • 1
  • 1
  • 2
  • 1
    You can find the answer here in this similar question: http://raspberrypi.stackexchange.com/questions/43619/linux-headers-generic-package-not-found/43903#43903 – nwaltham Mar 31 '16 at 12:44

3 Answers3

6

You can try sudo apt-get install raspberrypi-kernel-headers if you're running raspbian.

As suggested here https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=154749

Ghanima
  • 15,855
  • 15
  • 61
  • 119
Dip
  • 111
  • 2
  • 2
1

Try:

sudo apt-get update
sudo apt-cache search linux-headers

It will list you the related packages.

van
  • 121
  • 2
1

At the moment there is no linux-headers for the 4.1.17 kernel version.

There are only headers for the 4.1.19 version for the 4.x branch. You can simply upgrade your kernel to the 4.1.19 version (now the newest stable branch showing 4.1.20):

sudo rpi-update f406502f5628d32e6ca5dadac34ff7ca59f8e27f

After install reboot your device and check typing uname -r if there is a 4.1.19-v7+ version. If it's OK, install linux-headers:

sudo apt-get install linux-headers-4.1.19-v7+
Greenonline
  • 2,740
  • 4
  • 23
  • 36
Huczu
  • 1,251
  • 9
  • 13
  • I updated my kernel to 4.1.20-v7+ by rpi-update but Raspbian's repo doesn't have any headers for 4.x kernel ;( Any solution how to install it? – K_Mil0 Mar 31 '16 at 11:59
  • You tried my rpi-update with this git hash ? It should update to 4.1.19 version. If this not you can try use other hash like: 7e4f4cb0bf8c8f7469727d5b710818c3e6eea289 . It points to 4.1.19 kernel version – Huczu Apr 01 '16 at 07:05
  • It won't help to solve that problem because raspian doesn't have headers newer than 3.18 in repo. I solved it by other way. I used "rpi-source" script which downloading and installing source for kernel. Thanks for your attepmts to help me ;) – K_Mil0 Apr 01 '16 at 15:12