Comment 100 for bug 1750937

Revision history for this message
Dmitry S (dstepanovs) wrote :

Running Ubuntu 16.04 (xenial) in VirtualBox (Windows host). After Ubuntu update got affected too - vboxdrv dkms won't install. dmesg would give:
[ 260.993242] vboxdrv: version magic '4.4.0-119-generic SMP mod_unload modversions ' should be '4.4.0-119-generic SMP mod_unload modversions retpoline '

$ uname -a
Linux ... 4.4.0-119-generic #143-Ubuntu SMP Mon Apr 2 16:08:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

In my case I had two GCC versions installed side by side (4.9 and 5):
$ sudo update-alternatives --config gcc
There are 2 choices for the alternative gcc (providing /usr/bin/gcc).

  Selection Path Priority Status
------------------------------------------------------------
  0 /usr/bin/gcc-5 20 auto mode
* 1 /usr/bin/gcc-4.9 10 manual mode
  2 /usr/bin/gcc-5 20 manual mode

update-alternatives was pointing to 4.9, so g++ --version was giving me 4.9:
$ gcc --version
gcc (Ubuntu 4.9.3-13ubuntu2) 4.9.3

Switched to version 5 and re-installed virtualbox-dkms:

$ sudo update-alternatives --config gcc
There are 2 choices for the alternative gcc (providing /usr/bin/gcc).

  Selection Path Priority Status
------------------------------------------------------------
  0 /usr/bin/gcc-5 20 auto mode
  1 /usr/bin/gcc-4.9 10 manual mode
* 2 /usr/bin/gcc-5 20 manual mode

Press <enter> to keep the current choice[*], or type selection number: 2

$ sudo apt-get install virtualbox-dkms --reinstall