LXC Update: Errors were encountered while processing:linux-headers-6.1.0-10-amd64linux-headers-amd64

JF62

New Member
Mar 5, 2023
23
3
3
I have this error on several LXC containers when trying to upgrade the lxc from debin 11 bullseye to 12 bookworm:

Processing triggers for ca-certificates (20230311) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Errors were encountered while processing:
linux-headers-6.1.0-10-amd64
linux-headers-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

The host upgrade worked fine and one lxc upgrade also worked. All others failed with the message displayed.

Host:
Kernelversion

Linux 6.2.16-4-pve #1 SMP PREEMPT_DYNAMIC PVE 6.2.16-5 (2023-07-14T17:53Z)
PVE-Manager-Version

pve-manager/8.0.3/bbf3993334bfa916

Does anyone have any idea what this could be?
 
Last edited:
It's pretty simple.
I just don't understand why you need linux headers inside an lxc container.
The only usecase i can think of, is compiling modules or kernels, that you want to move/install later on the host.

However, you need to remove linux-headers.
apt remove --purge linux-headers

If you still need headers (for whatever reason), then you'll need to add the pve no-subscription repository to your apt sources in the lxc container and install:
apt install pve-headers

Cheers
 
Ok, I can follow your argument. But all these containers were loaded and installed as a naked Debian 11 container template and then the corresponding packages (e.g. pihole, iobroker, ...) were installed there
 
Ok, I can follow your argument. But all these containers were loaded and installed as a naked Debian 11 container template and then the corresponding packages (e.g. pihole, iobroker, ...) were installed there
But pihole and iobroker etc don't need linux-headers or any headers.
So it's save to remove anyway.

Im running them like you in containers.

If you still fail, there is another solution.
For iobroker there is a backup/restore "instnce" or plugin...

And pihole is just a script and there you get the teleporter anyway.

You could simply deploy an debian 12 or ubuntu 23.04 from a template again and simply reinstall iobroker/pihole :-)

Or just remove linux-headers:-)
 
your arguments both are true and I can setup them new, but this two are just examples and I have several other lxc's running where it's not so easy with backup/restore .
Also iobroker with usb zigbee dongle at host and passed through to container ;-)
I will remove remove linux-headers and try then the upgrade
 
  • Like
Reactions: Ramalama
your arguments both are true and I can setup them new, but this two are just examples and I have several other lxc's running where it's not so easy with backup/restore .
Also iobroker with usb zigbee dongle at host and passed through to container ;-)
I will remove remove linux-headers and try then the upgrade
Btw i switched from a zigbee usb stick to slzb-06 over network.
Was one of the best things i ever did, because i didn't had to "f**k" anymore with usb passthrough:-)

But passthrough into an lxc container works well, just from time to time i had random issues where the stick was suddenly not accessable.
Rarely but happened.

And you don't have for example to remember ever anymore how to upgrade the fw on the stick etc...
Since you can flash the slzb-06 from the GUI etc.
And the slzb-06 has an absolute exiting range.

However, take that as tip, it's not something someone really needs, but something i never regretted switching to :-)
 
apt remove --purge linux-headers
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'linux-headers' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded


and now ???
 
Btw i switched from a zigbee usb stick to slzb-06 over network.
Was one of the best things i ever did, because i didn't had to "f**k" anymore with usb passthrough:)

But passthrough into an lxc container works well, just from time to time i had random issues where the stick was suddenly not accessable.
Rarely but happened.

And you don't have for example to remember ever anymore how to upgrade the fw on the stick etc...
Since you can flash the slzb-06 from the GUI etc.
And the slzb-06 has an absolute exiting range.

However, take that as tip, it's not something someone really needs, but something i never regretted switching to :)
thanks for the hint - I will check this
 
apt remove --purge linux-headers
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'linux-headers' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded


and now ???
Errors were encountered while processing:
linux-headers-6.1.0-10-amd64
linux-headers-amd64
E: Sub-process /usr/bin/dpkg returned an error code(1)

this error happened in the lxc container during upgrade itself, or on the host?
just to be clear that i didn't missunderstood sth?
 
upgrade inside the container
Errors were encountered while processing:
linux-headers-6.1.0-10-amd64
linux-headers-amd64
E: Sub-process /usr/bin/dpkg returned an error code(1)

this error happened in the lxc container during upgrade itself, or on the host?
just to be clear that i didn't missunderstood sth?
upgrade of container. Host is all fine
 
Could you simply post me the output of:
cat /etc/apt/sources.list
cat /etc/os-release
apt list --installed

Edit: and tell me if it's an privileged or Unprivileged container.
 
Last edited:
Before upgrade:
cat /etc/apt/sources.list:

deb http://deb.debian.org/debian bullseye main contrib
deb http://deb.debian.org/debian bullseye-updates main contrib
deb http://security.debian.org bullseye-security main contrib

cat /etc/os-release:

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
 
unprivileged
Okay...

I replicated your container completely, means:
installed all packages you have + webmin

changed from bulleye to bookworm and did an dist-upgrade.
Everything upgraded fine and it didn't wanted to install linux-headers here :-(

Did you replaced some packages from upstream, i mean anything other as webmin under /etc/apt/sources.list.d/ ?
 
webmin I removed in meantime, because of new gpg key validation and installed just from source and will update inside webmin inside itself
 
webmin I removed in meantime, because of new gpg key validation and installed just from source and will update inside webmin inside itself
okay, i have now zero difference to you (installed node etc)

Just webmin is left, so this can be actually the only cause why it fails.
I have to compile webmin now either then.
-> now i understand why you have gcc and build-utils and git and whatever else installed xD

Need a bit for webmin, will reply later
 
  • Like
Reactions: JF62
okay, i have now zero difference to you (installed node etc)

Just webmin is left, so this can be actually the only cause why it fails.
I have to compile webmin now either then.
-> now i understand why you have gcc and build-utils and git and whatever else installed xD

Need a bit for webmin, will reply later
Do not invest too much in webmin, that is quickly removed and also reinstalled. But gcc and git etc. I use for own java development there
 
Last edited:
Did you edited your lxc config, probably gaved the lxc container the CAP_SYS_RAWIO capability?

Otherwise, i removed webmin and cloned the github and did the ./setup.sh method.

However, played a bit etc... and i can't trigger the error here on dist-upgrade.
So i have no clue why it wants to install linux-headers for you :-(

No idea sorry.
At least for this specific container.

But tbh, i don't have time to do this all again, make my container package-parity with yours, for your other containers.
Its very weird at least.

Something triggers linux-headers, but at least i cant find out what.
And sadly there is no way to just tell a dist-upgrade to not install/skip linux-headers.

And you dont have linux-headers-6.1.0-10-amd64 or linux-headers-amd64 installed anyway, according to your package list.

Thats somewhat a mystery, so well yeah, the only thing thats left, is starting from scratch with debian12 or stay simply on debian11...
I mean its an lxc container, that will work still a long time, but you aren't up2date of course.

Cheers
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!