I am trying to install the kernel header files on Debian via the terminal, but it does not seem to exist in apt-get.

The reason I need the kernel header files is because I need to install WiFi adapter drivers for an RTL wifi chip, and when running the install.sh that comes with the drivers it ends with an error that says that it can not find build in /lib/modules/3.4.90+/.

I have read articles that suggest that I need to compile and build the kernel from scratch but that seems a bit unnecessary to me.

I have also tried sudo apt-get install linux-headers-$(uname -r) but an lower version of the kernel is installed instead.

Could anyone point me in the right direction?


I'm on ARM Debian and the WiFi module uses a RTL8188 chip.

I downloaded the Linux image from www.armhf.com

  • btw, what model realtik nic is it? it may be supported in a later version of the mainline kernel.
    – cas
    Commented Dec 3, 2015 at 1:57
  • I updated the question.
    – vaid
    Commented Dec 3, 2015 at 10:02
  • Sorry, i know very little about arm hardware...and amongst what little i do know is that there is not much consistency or standardisation in arm linux devices, every manufacturer does things differently. your best best is to google for your device's brand and model with 'linux kernel'. BTW, if you downloaded the linux image from www.armhf.com, do they also have the matching kernel source or headers? or an updated version with RTL8188 support?
    – cas
    Commented Dec 3, 2015 at 20:00
  • BTW, is there any particular reason why you downloaded and installed a kernel from www.armhf.com? Can you revert back to the stock debian kernel? If you could then you could install the matching linux-headers-* package as in my answer.
    – cas
    Commented Dec 3, 2015 at 20:03
  • is your device an odroid xu? that's the only device on www.armhf.com that has even close to a 3.4.90 kernel (all the others have 3.10.17 or for the odroid xu they have linux image and headers for - if your device is an adroid, try upgrading to that and installing the headers at the same time. armhf.com/boards/odroid-xu/#wheezy
    – cas
    Commented Dec 3, 2015 at 20:20

2 Answers 2


Are you using a stock debian kernel or a custom-compiled kernel? If stock, there should be a matching linux-headers-* package for your linux-image-* package.

Debian also has virtual packages called linux-image-$arch and linux-headers-$arch (e.g. where $arch is amd64 or 586 or 686-pae etc) that depend on the most recent available kernel packages so if your system is amd64 then

apt-get install linux-image-amd64 linux-headers-amd64

will install the most recent kernel image and headers for your version of debian.

The same is true if you are using kernels from the Liquorix repository, but the virtual packages have slightly different names:

apt-get install linux-image-liquorix-amd64 linux-headers-liquorix-amd64

Note that for realtek NICs you will probably also need to install the realtek firmware from the non-free section of the debian archives. Make sure that non-free is in your /etc/apt/sources.list and run

apt-get install firmware-realtek

Finally, to compile modules you will probably also need the dkms package or at least the build-essential package installed.

  • sorry, its for ARM. Not intel or AMD.
    – vaid
    Commented Dec 3, 2015 at 9:59
  • I updated the question.
    – vaid
    Commented Dec 3, 2015 at 10:02
  • Btw I think it's a custom kernel. I downloaded it from www.armhf.com but it says "Root File System (No kernel)"
    – vaid
    Commented Dec 3, 2015 at 10:05

All I had to do was to copy the folder 3.4.90+ in the path /lib/modules from the original Olimex Debian Image to the same path on the NAND flash.

After that I just installed firmware-realtek and wpa_supplicant and I was up and running.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .