Install Linux Kernel Headers

jon@librem:~$ sudo apt install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-headers-4.19.0-4-amd64
E: Couldn't find any package by glob 'linux-headers-4.19.0-4-amd64'
E: Couldn't find any package by regex 'linux-headers-4.19.0-4-amd64'

What gives? The main Librem repo doesn’t have the kernel headers for this distro?

This is after several “sudo apt-get update && sudo apt-get upgrade” commands, indicating I’m on the latest versions.

hi ! is it the same if you ?

sudo apt update

then

sudo apt upgrade

Didn’t work.

Though I must admit, through this process I added the following Debian Buster repos to my /etc/apt/sources.list in hopes they would have the kernel headers:

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

And now when I did the commands you suggested, it upgraded my entire OS. Not sure if that messed anything up, unrelated to this. Anyway, I still can’t get those kernel headers.

Well, it seems like the 4.19.0-5 headers are there:
https://software.pureos.net/suite/green/kernel/1

Have you tried that instead of 4.19.0-4?

1 Like

Interesting, it worked when I included that full name (after confirming my latest updating got me to kernel 4.19.0.5):

sudo apt install linux-headers-4.19.0.5-all

Not sure why the original command doesn’t work. Oh well, thanks!