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.


3 Answers 3


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



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

It will list you the related packages.


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+
  • 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
    Commented Mar 31, 2016 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
    Commented Apr 1, 2016 at 7: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
    Commented Apr 1, 2016 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.