Virtualbox error after installing new linux kernel 4.4
Try to install g++/gcc version 5.3 and compile dkms with it
I'm using Ubuntu 14.04 and I was able to run virtual machine using the following advice
First try
sudo /usr/lib/virtualbox/vboxdrv.sh setup
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMSERROR (dkms apport): kernel package linux-headers-4.4.0-040400-generic is not supported
Error! Bad return status for module build on kernel: 4.4.0-040400-generic (x86_64)
Consult /var/lib/dkms/vboxhost/5.0.14/build/make.log for more information.
...failed!
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules ...failed!
(Look at /var/log/vbox-install.log to find out what went wrong)
add repository
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
install gcc/g++
sudo apt-get install gcc-5 g++-5
The next step is to add alternatives to gcc/g++ show installed versions
ls -lh /usr/bin/gcc*
and for each of them add alternative, mine are
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20 --slave /usr/bin/g++ g++ /usr/bin/g++-5
last step is to select what to use
sudo update-alternatives --config gcc
and select 3 entry in my case
Now try to compile DKMS
sudo /usr/lib/virtualbox/vboxdrv.sh setup
Now it is successfully compiled
sudo /usr/lib/virtualbox/vboxdrv.sh setup
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMS ...done.
Starting VirtualBox kernel modules ...done.
Related videos on Youtube
Frank
Updated on September 18, 2022Comments
-
Frank over 1 year
I have ubuntu x64 15.04 and I have installed latest stable kernel 4.4. I also installed
virtualbox 5.0.14
, downloaded from here.I tried to run a virtual machine and I got this error:
I tried to run:
sudo /sbin/rcvboxdrv setup
and I got:Bad argument setup
so I triedsudo /usr/lib/virtualbox/vboxdrv.sh setup
and I got:Stopping VirtualBox kernel modules ...done. Uninstalling old VirtualBox DKMS kernel modulesError! Could not locate dkms.conf file. File: does not exist. ...done. Trying to register the VirtualBox kernel modules using DKMSError! DKMS tree already contains: vboxhost-5.0.14 You cannot add the same module/version combo more than once. ...failed! (Failed, trying without DKMS) Recompiling VirtualBox kernel modules ...failed! (Look at /var/log/vbox-install.log to find out what went wrong)
and here is the
vbox-install.log
: http://pastebin.com/raw/2u2zcS75How can I solve it? I'd like to keep the new kernel.
Thanks
-
Adam Ryczkowski over 8 yearsI think it has nothing to do with the kernel. I have the same problem with Ubuntu 14.04 on
3.16.0-59-generic
kernel. -
bain over 8 yearsPossible duplicate of Virtualbox Kernel driver not installed
-
-
Frank over 8 yearsOk I have downloaded the script and change
VERSION=5.0.12
toVERSION=5.0.14
. I ransudo sh ./rcvboxdrv.sh setup
in/sbin
and I got this error: pastebin.com/raw/j0kynqV0 -
Adam Ryczkowski over 8 years@Frank. Well, I did run the script without any change (still version 5.0.12) and it did resolve the issue. Anyway, this is a known problem, already reported on the Oracle's bugtracker: virtualbox.org/ticket/15055 . Anyways, there are two other solutions/walkarounds. You can see them as answers and comments to askubuntu.com/questions/724184/…
-
Powerriegel almost 8 yearsIt changed something but did not solve the problem completely. I guess you have packages installed I missed.
-
Powerriegel almost 8 yearsI now fixed it by installing VirtualBox from the website not from Ubuntu sources!