0

I just build a new Ubuntu desktop to replace my old machine and I have not been successful installing VirtualBox. This is the message I receive when I try to install:

sudo gdebi virtualbox-6.1_6.1.18-142142_Ubuntu_eoan_amd64.deb
[sudo] password for myusername: 
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Reading state information... Done

Oracle VM VirtualBox
 VirtualBox is a powerful PC virtualization solution allowing you to run a
 wide range of PC operating systems on your Linux system. This includes
 Windows, Linux, FreeBSD, DOS, OpenBSD and others. VirtualBox comes with a broad
 feature set and excellent performance, making it the premier virtualization
 software solution on the market.
Do you want to install the software package? [y/N]:y
/usr/bin/gdebi:113: FutureWarning: Possible nested set at position 1
  c = findall("[[(](\S+)/\S+[])]", msg)[0].lower()
(Reading database ... 280449 files and directories currently installed.)
Preparing to unpack virtualbox-6.1_6.1.18-142142_Ubuntu_eoan_amd64.deb ...
Unpacking virtualbox-6.1 (6.1.18-142142~Ubuntu~eoan) over (6.1.18-142142~Ubuntu~eoan) ...
Setting up virtualbox-6.1 (6.1.18-142142~Ubuntu~eoan) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.

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.
Processing triggers for systemd (245.4-4ubuntu3.4) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for shared-mime-info (1.15-1) .

I then executed sudo /sbin/vboxconfig and receive the same message shown above.

`sudo modprobe vboxdrv modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/5.11.6-051106-generic'

This is an excerpt from the vbox-setup.log file:

Building the main VirtualBox module.
Building the net filter module.
Error building the module:
make V=1 CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C /lib/modules/5.11.6-051106-generic/build M=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j12 modules
make[1]: warning: -j12 forced in submake: resetting jobserver mode.
make -f ./scripts/Makefile.build obj=/tmp/vbox.0 \
single-build= \
need-builtin=1 need-modorder=1
  gcc -Wp,-MMD,/tmp/vbox.0/linux/.VBoxNetFlt-linux.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/9/include -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wimplicit-fallthrough -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -gdwarf-4 -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h -fno-pie -Wno-declaration-after-statement -I./include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DVBOX_WITH_64_BITS_GUESTS -DRT_ARCH_AMD64  -DMODULE  -DKBUILD_BASENAME='"VBoxNetFlt_linux"' -DKBUILD_MODNAME='"vboxnetflt"' -c -o /tmp/vbox.0/linux/VBoxNetFlt-linux.o /tmp/vbox.0/linux/VBoxNetFlt-linux.c
.
. **items left out**
.
/tmp/vbox.0/linux/VBoxNetFlt-linux.c: In function ‘vboxNetFltNeedsLinkState’:
/tmp/vbox.0/linux/VBoxNetFlt-linux.c:1761:47: error: dereferencing pointer to incomplete type ‘const struct ethtool_ops’
 1761 |     if (pDev->ethtool_ops && pDev->ethtool_ops->get_drvinfo)
      |                                               ^~
/tmp/vbox.0/linux/VBoxNetFlt-linux.c:1763:32: error: storage size of ‘Info’ isn’t known
 1763 |         struct ethtool_drvinfo Info;
      |                                ^~~~
/tmp/vbox.0/linux/VBoxNetFlt-linux.c:1766:20: error: ‘ETHTOOL_GDRVINFO’ undeclared (first use in this function)
 1766 |         Info.cmd = ETHTOOL_GDRVINFO;
      |                    ^~~~~~~~~~~~~~~~
/tmp/vbox.0/linux/VBoxNetFlt-linux.c:1766:20: note: each undeclared identifier is reported only once for each function it appears in
/tmp/vbox.0/linux/VBoxNetFlt-linux.c:1763:32: warning: unused variable ‘Info’ [-Wunused-variable]
 1763 |         struct ethtool_drvinfo Info;
      |                                ^~~~
make[2]: *** [scripts/Makefile.build:279: /tmp/vbox.0/linux/VBoxNetFlt-linux.o] Error 1
make[1]: *** [Makefile:1806: /tmp/vbox.0] Error 2
make: *** [/tmp/vbox.0/Makefile-footer.gmk:117: vboxnetflt] Error 2

I then followed the suggestion at https://superuser.com/questions/1438279/how-to-sign-a-kernel-module-ubuntu-18-04 and this didn't seem to help with the installation.

My system information:

Kernel      : Linux 5.11.6-051106-generic (x86_64)
Version     : #202103111435 SMP Thu Mar 11 14:42:39 UTC 2021
C Library       : GNU C Library / (Ubuntu GLIBC 2.31-0ubuntu9.2) 2.31
Distribution        : Ubuntu 20.04.2 LTS

-Computer-
Processor       : AMD Ryzen 5 5600X 6-Core Processor
Memory      : 32882MB (4133MB used)
Machine Type        : Desktop
Operating System        : Ubuntu 20.04.2 LTS
User Name       : root (root)
Date/Time       : Thu 11 Mar 2021 05:49:58 PM CST


Any help will be greatly appreciated. Thank you.

1
  • Why are you trying to install a virtualbox built for eoan (or 19.10) on a focal system? Why not use a later focal build (6.1.16 is the default for focal not older 6.1.6)? Are you really using Ubuntu 20.04? as the kernel listed doesn't match (it's not a supported Ubuntu kernel, testing at best) – guiverc Mar 12 at 2:42
0

Tested on Ubuntu 20.04 with 5.1.14 mainline Kernel

You should install the Testbuilds version from this link https://www.virtualbox.org/wiki/Testbuilds

First uninstall all other versions.

wget https://www.virtualbox.org/download/testcase/VirtualBox-6.1.19-142995-Linux_amd64.run
chmod +x VirtualBox*.run
./VirtualBox-6.1.19-142995-Linux_amd64.run

Then download the extpack file and launch it by clicking or in VirtuaBox itself.

wget https://www.virtualbox.org/download/testcase/Oracle_VM_VirtualBox_Extension_Pack-6.1.19-142994.vbox-extpack

You can find daily build too (6.1.97) in the link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.