install header-package in container

drnicolas

Renowned Member
Dec 8, 2010
177
7
83
I need to install linux-headers in a container.

but the typical apt install linux-headers faisl as well as install pve-headers

What can I do ?
 
okay;
A software install process asks me to install
apt install linux-headers-`uname -r` which is then
E: Unable to locate package linux-headers-5.13.19-6-pve
E: Couldn't find any package by glob 'linux-headers-5.13.19-6-pve'
E: Couldn't find any package by regex 'linux-headers-5.13.19-6-pve'

my sources-list looks like this ...

deb http://ftp.debian.org/debian buster main contrib

deb http://ftp.debian.org/debian buster-updates main contrib

deb http://security.debian.org buster/updates main contrib

deb http://download.proxmox.com/debian bullseye pve-no-subscription
deb http://security.debian.org bullseye/updates main contrib


Still the same problem
 
A software install process asks me to install
What exactly?

Still the same problem
You can also copy the headers from the host to the guest. But keep in mind that you will not be able to load the module from the guest. So if your software requires the module in order to run, it won't be able to run in your container either, so you should, as @tom already suggested, move to a VM.