vboxdrv.sh: failed: Look at /var/log/vbox-install.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.
In file included from ./include/linux/srcu.h:33:0,
from ./include/linux/notifier.h:15,
from ./include/linux/memory_hotplug.h:6,
from ./include/linux/mmzone.h:751,
from ./include/linux/gfp.h:5,
from ./include/linux/slab.h:14,
from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:82,
from /tmp/vbox.0/linux/VBoxNetFlt-linux.c:24:
./include/linux/netfilter.h: In function ‘nf_hook’:
./include/linux/netfilter.h:205:33: error: dereferencing pointer to incomplete type ‘struct net’
hook_head = rcu_dereference(net->nf.hooks[pf][hook]);
^
./include/linux/rcupdate.h:610:10: note: in definition of macro ‘__rcu_dereference_check’
typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \
^
./include/linux/rcupdate.h:790:28: note: in expansion of macro ‘rcu_dereference_check’
#define rcu_dereference(p) rcu_dereference_check(p, 0)
^~~~~~~~~~~~~~~~~~~~~
./include/linux/netfilter.h:205:14: note: in expansion of macro ‘rcu_dereference’
hook_head = rcu_dereference(net->nf.hooks[pf][hook]);
^~~~~~~~~~~~~~~
scripts/Makefile.build:294: recipe for target '/tmp/vbox.0/linux/VBoxNetFlt-linux.o' failed
make[2]: *** [/tmp/vbox.0/linux/VBoxNetFlt-linux.o] Error 1
Makefile:1490: recipe for target '_module_/tmp/vbox.0' failed
make[1]: *** [_module_/tmp/vbox.0] Error 2
Makefile:210: recipe for target 'vboxnetflt' failed
make: *** [vboxnetflt] Error 2
I am sure that makes perfect sense to you but I still need to know if you added the virtualbox repo to your sources list and if so how. If you did not then you are actually using the Ubuntu fork.
The following NEW packages will be installed:
libqt5x11extras5 virtualbox-5.1
0 upgraded, 2 newly installed, 0 to remove and 10 not upgraded.
Need to get 0 B/66.0 MB of archives.
After this operation, 164 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
Selecting previously unselected package libqt5x11extras5:amd64.
(Reading database ... 231511 files and directories currently installed.)
Preparing to unpack .../libqt5x11extras5_5.6.1-2build1~1_amd64.deb ...
Unpacking libqt5x11extras5:amd64 (5.6.1-2build1~1) ...
Selecting previously unselected package virtualbox-5.1.
Preparing to unpack .../virtualbox-5.1_5.1.22-115126~Ubuntu~yakkety_amd64.deb ...
Unpacking virtualbox-5.1 (5.1.22-115126~Ubuntu~yakkety) ...
Setting up libqt5x11extras5:amd64 (5.6.1-2build1~1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu1.1) ...
Setting up virtualbox-5.1 (5.1.22-115126~Ubuntu~yakkety) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxdrv.service → /lib/systemd/system/vboxdrv.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxballoonctrl-service.service → /lib/systemd/system/vboxballoonctrl-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxautostart-service.service → /lib/systemd/system/vboxautostart-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxweb-service.service → /lib/systemd/system/vboxweb-service.service.
vboxdrv.sh: failed: Look at /var/log/vbox-install.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.
Processing triggers for libc-bin (2.24-3ubuntu2) ...
Processing triggers for systemd (231-9ubuntu4) ...
Processing triggers for shared-mime-info (1.7-1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu4) ...
Processing triggers for hicolor-icon-theme (0.15-1) ...
I included the vbox-install.log errors in my original post.
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Strange, this usually does not happen with Linux. If I were working on this I would purge the current install and download the actual deb file, then use dpkg to install it.
sudo apt-get install libqt5x11extras5
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libqt5x11extras5
0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.
1 not fully installed or removed.
Need to get 0 B/8,570 B of archives.
After this operation, 35.8 kB of additional disk space will be used.
Selecting previously unselected package libqt5x11extras5:amd64.
(Reading database ... 232291 files and directories currently installed.)
Preparing to unpack .../libqt5x11extras5_5.6.1-2build1~1_amd64.deb ...
Unpacking libqt5x11extras5:amd64 (5.6.1-2build1~1) ...
Setting up libqt5x11extras5:amd64 (5.6.1-2build1~1) ...
Setting up virtualbox-5.1 (5.1.22-115126~Ubuntu~yakkety) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxdrv.service → /lib/systemd/system/vboxdrv.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxballoonctrl-service.service → /lib/systemd/system/vboxballoonctrl-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxautostart-service.service → /lib/systemd/system/vboxautostart-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxweb-service.service → /lib/systemd/system/vboxweb-service.service.
vboxdrv.sh: failed: Look at /var/log/vbox-install.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.
Processing triggers for libc-bin (2.24-3ubuntu2) ...
Not much difference. I'm thinking maybe this is a bug.
If this were a bug there would be a lot of people that are having this same issue and there are not. Did you purge the original install first like I suggested? Also when you run a package install and it fails due to dependencies just run apt-get install -f right after and it will pull in the needed packages. That said if I am reading this right you have done this several times and yet it still says that it is needed as a dependency. This would indicate an issue with the host.
Yes, I purged the original install both times. There's no dependecy issues on my machine. Everything is resolved. There's also no difference between running
and installing the single depedency manually. The only reason I think it's a bug, is because the errors stem from the failed compilation of the virtualbox network module:
I am basing my opinion on the fact that you installed "libqt5x11extras5" but it states that it is needed again and supposedly installs it again and it appears to be three times, but what do I know, I could be wrong. In any case if you really think this is a bug you need to post a ticket at bugtracker
Oh and failure to compile is not that unusual if there is a missing dependency.
You're right. It most likely isn't a bug. I just solved the issue by downgrading my kernel to 4.9.19. Virtualbox installed correctly and is working flawlessly. I don't know what the hell was going on with my previous kernel, but it's all sorted out now.