Saturday, November 27, 2021

/sbin/vboxconfig

Unable to start VM in virtual box with latest kernel (5.16) in Ubuntu 20


boxdrv.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-5.16.2-051602-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-5.16.2-051602-generic

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.  If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.


Also tried install manually for Linux headers manually (https://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D)


root@pramod-Inspiron-5547:/home/pramod/kernelfiles# ls
linux-headers-5.16.2-051602_5.16.2-051602.202201200936_all.deb  linux-headers-5.16.2-051602-generic_5.16.2-051602.202201200936_amd64.deb
root@pramod-Inspiron-5547:/home/pramod/kernelfiles# sudo dpkg -i *.deb
(Reading database ... 268671 files and directories currently installed.)
Preparing to unpack linux-headers-5.16.2-051602_5.16.2-051602.202201200936_all.deb ...
Unpacking linux-headers-5.16.2-051602 (5.16.2-051602.202201200936) over (5.16.2-051602.202201200936) ...
Selecting previously unselected package linux-headers-5.16.2-051602-generic.
Preparing to unpack linux-headers-5.16.2-051602-generic_5.16.2-051602.202201200936_amd64.deb ...
Unpacking linux-headers-5.16.2-051602-generic (5.16.2-051602.202201200936) ...
Setting up linux-headers-5.16.2-051602 (5.16.2-051602.202201200936) ...
dpkg: dependency problems prevent configuration of linux-headers-5.16.2-051602-generic:
 linux-headers-5.16.2-051602-generic depends on libc6 (>= 2.34); however:
  Version of libc6:amd64 on system is 2.31-0ubuntu9.2.
 linux-headers-5.16.2-051602-generic depends on libssl3 (>= 3.0.0~~alpha1); however:
  Package libssl3 is not installed.

dpkg: error processing package linux-headers-5.16.2-051602-generic (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-headers-5.16.2-051602-generic
So tried installing libc module


root@pramod-Inspiron-5547:/home/pramod/kernelfiles# sudo apt install libc6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libc6 is already the newest version (2.31-0ubuntu9.2).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 linux-headers-5.16.2-051602-generic : Depends: libc6 (>= 2.34) but 2.31-0ubuntu9.2 is to be installed
                                       Depends: libssl3 (>= 3.0.0~~alpha1) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
But correct way to install is as below, but won't resolved issue.

root@pramod-Inspiron-5547:/home/pramod/kernelfiles# sudo apt install libc6=2.31-0ubuntu9.2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libc6 is already the newest version (2.31-0ubuntu9.2).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 linux-headers-5.16.2-051602-generic : Depends: libc6 (>= 2.34) but 2.31-0ubuntu9.2 is to be installed
                                       Depends: libssl3 (>= 3.0.0~~alpha1) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
So finally downgraded the kernel version corresponding to Ubuntu release (https://en.wikipedia.org/wiki/Ubuntu_version_history#Table_of_versions) and then ran below. Thus fixed the issue.
root@pramod-Inspiron-5547:~# apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  linux-headers-5.16.2-051602-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 25.0 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 314514 files and directories currently installed.)
Removing linux-headers-5.16.2-051602-generic (5.16.2-051602.202201200936) .
***

No comments:

Post a Comment