linux-headers not automatically found

MACscr

Member
Mar 19, 2013
95
3
8
Why is it when I update the proxmox kernels, it doesnt automatically update/find its required support files as well? Its irritating that i have to manually install them every time there is an update with apt-get.

Code:
root@stor2:~# apt-get dist-upgrade -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... The following packages were automatically installed and are no longer required:
  libnvpair1 libuutil1 libzfs2 libzpool2
Use 'apt-get autoremove' to remove them.
Done
The following NEW packages will be installed:
  pve-kernel-4.4.24-1-pve
The following packages will be upgraded:
  proxmox-ve
1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/44.1 MB of archives.
After this operation, 0 B of additional disk space will be used.
Selecting previously unselected package pve-kernel-4.4.24-1-pve.
(Reading database ... 184749 files and directories currently installed.)
Preparing to unpack .../pve-kernel-4.4.24-1-pve_4.4.24-72_amd64.deb ...
Unpacking pve-kernel-4.4.24-1-pve (4.4.24-72) ...
Preparing to unpack .../proxmox-ve_4.3-72_all.deb ...
Unpacking proxmox-ve (4.3-72) over (4.3-71) ...
Setting up pve-kernel-4.4.24-1-pve (4.4.24-72) ...
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.24-1-pve /boot/vmlinuz-4.4.24-1-pve
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.24-1-pve /boot/vmlinuz-4.4.24-1-pve
Error! Your kernel headers for kernel 4.4.24-1-pve cannot be found.
Please install the linux-headers-4.4.24-1-pve package,
or use the --kernelsourcedir option to tell DKMS where it's located
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.24-1-pve /boot/vmlinuz-4.4.24-1-pve
update-initramfs: Generating /boot/initrd.img-4.4.24-1-pve
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.24-1-pve /boot/vmlinuz-4.4.24-1-pve
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.24-1-pve /boot/vmlinuz-4.4.24-1-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.24-1-pve
Found initrd image: /boot/initrd.img-4.4.24-1-pve
Found linux image: /boot/vmlinuz-4.4.21-1-pve
Found initrd image: /boot/initrd.img-4.4.21-1-pve
Found linux image: /boot/vmlinuz-4.4.10-1-pve
Found initrd image: /boot/initrd.img-4.4.10-1-pve
Found linux image: /boot/vmlinuz-4.4.8-1-pve
Found initrd image: /boot/initrd.img-4.4.8-1-pve
Found linux image: /boot/vmlinuz-4.2.8-1-pve
Found initrd image: /boot/initrd.img-4.2.8-1-pve
Found linux image: /boot/vmlinuz-4.2.6-1-pve
Found initrd image: /boot/initrd.img-4.2.6-1-pve
Found linux image: /boot/vmlinuz-4.2.3-2-pve
Found initrd image: /boot/initrd.img-4.2.3-2-pve
done
Setting up proxmox-ve (4.3-72) ...
root@stor2:~# apt-cache search pve-headers
pve-headers-4.4.8-1-pve - The Proxmox PVE Kernel Headers
pve-headers-4.4.16-1-pve - The Proxmox PVE Kernel Headers
pve-headers-4.4.19-1-pve - The Proxmox PVE Kernel Headers
pve-headers-4.2.3-2-pve - The Proxmox PVE Kernel Headers
pve-headers-4.4.15-1-pve - The Proxmox PVE Kernel Headers
pve-headers-4.2.6-1-pve - The Proxmox PVE Kernel Headers
pve-headers-4.4.24-1-pve - The Proxmox PVE Kernel Headers
pve-headers-4.4.21-1-pve - The Proxmox PVE Kernel Headers
pve-headers-4.2.3-1-pve - The Proxmox PVE Kernel Headers
pve-headers-4.4.10-1-pve - The Proxmox PVE Kernel Headers
pve-headers-4.2.8-1-pve - The Proxmox PVE Kernel Headers
pve-headers-4.4.13-2-pve - The Proxmox PVE Kernel Headers
pve-headers-4.4.6-1-pve - The Proxmox PVE Kernel Headers
pve-headers-4.4.13-1-pve - The Proxmox PVE Kernel Headers
pve-headers - Latest Proxmox VE Kernel Headers
pve-headers-4.2.2-1-pve - The Proxmox PVE Kernel Headers
root@stor2:~#
 
You just need to install the correct packages:

# apt-get install pve-headers

This makes sure that you also have latest headers.
 
  • Like
Reactions: MACscr
BTW, why does this have to be done manually? Why cant apt-get find them properly when doing upgrades? It shouldnt require manual intervention every time.
 

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!