kernel headers not found - although installed

Questions about virtualization software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Obelix21

kernel headers not found - although installed

Post by Obelix21 »

Hi everyone,

I'm trying to get VirtualBox to run again after an upgrade to Linux Mint 18.3. When trying to start any of my boxes it tells me that the kernel driver is not installed and I should remedy said situation by running

Code: Select all

/sbin/vboxconfig
as root.
When trying to do that, I get the following output:

Code: Select all

# /sbin/vboxconfig 
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    linux-headers-generic linux-headers-4.17.13-041713-generic
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    linux-headers-generic linux-headers-4.17.13-041713-generic

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.
So, my currently running kernel is

Code: Select all

➜  ~ uname -a
Linux BLACK 4.17.13-041713-generic #201808061132 SMP Mon Aug 6 15:34:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
When checking the installed header files I get this:

Code: Select all

dpkg -l | grep linux-headers
ii  linux-headers-4.17.13-041713                                4.17.13-041713.201808061132                  all          Header files related to Linux kernel version 4.17.13
ii  linux-headers-4.17.4-041704                                 4.17.4-041704.201807031235                   all          Header files related to Linux kernel version 4.17.4
ii  linux-headers-4.4.0-131                                     4.4.0-131.157                                all          Header files related to Linux kernel version 4.4.0
ii  linux-headers-4.4.0-131-generic                             4.4.0-131.157                                amd64        Linux kernel headers for version 4.4.0 on 64 bit x86 SMP
ri  linux-headers-4.4.0-97                                      4.4.0-97.120                                 all          Header files related to Linux kernel version 4.4.0
ri  linux-headers-4.4.0-97-generic                              4.4.0-97.120                                 amd64        Linux kernel headers for version 4.4.0 on 64 bit x86 SMP
ii  linux-headers-generic                                       4.4.0.131.137                                amd64        Generic Linux kernel headers
As you can see the linux-headers-4.17.13 are in fact installed, albeit vboxconfig's complaining that they arent. But oddly the linux-headers-generic is still version 4.4.0. That was the kernel version when I first installed Linux Mint on this machine 2+ years ago. I'm quite sure it was gone after I removed that kernel version later on but was re-installed today when I did

Code: Select all

sudo apt-get install linux-headers-generic
in an attempt to install the 4.17.13 version of the file. For some reason it re-installed the old one. Version 4.4.0 of linux-headers are also the only ones that have ever popped up in the listing of files in the update manager in recent years, despite having installed and been running newer kernels.
I don't know how to update that if that should be the culprit. Can anyone give me a hint? Anything else I could try?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Obelix21

Re: kernel headers not found - although installed

Post by Obelix21 »

Ok, I've narrowed it down to a problem with libssl1.1, which needs to be installed before linux-headers-4.17.13-041713-generic can be installed apparently. Alas, I find no way of doing that, because libssl1.1 apparently is a package not yet available for Linux Mint. It is for Debian, Mandriva and Ubuntu 18.04, but Mint 18.3 is based on Ubuntu 16.04. I'm not familiar enough with Linux to know how to resolve this issue other than reverting to a kernel that doesn't need libssl1.1 to install linux-headers-generic. Anyone?
gm10

Re: kernel headers not found - although installed

Post by gm10 »

You are running an unsupported kernel that wasn't even compiled for your release. Of course you won't find the components in the repository. Either compile the kernel yourself from the sources or install the missing dependencies the same way you installed the kernel and hope they don't create conflicts. Or re-consider if a supported kernel isn't the better option.
Locked

Return to “Virtual Machines”