As I upgraded to version 4.1.8 of Virtualbox on my Ubuntu host system today I got some strange error messages. Although Virtualbox still seems to work fine afterwards I tried to solve these issues as these messages appeared now for a while already during every upgrade.

They looked like

* Stopping VirtualBox kernel modules [ OK ]
* Uninstalling old VirtualBox DKMS kernel modules dkms.conf: Error! No ‘DEST_MODULE_LOCATION’ directive specified.
dkms.conf: Error! No ‘PACKAGE_NAME’ directive specified.
dkms.conf: Error! No ‘PACKAGE_VERSION’ directive specified.
dkms.conf: Error! No ‘DEST_MODULE_LOCATION’ directive specified.
dkms.conf: Error! No ‘PACKAGE_NAME’ directive specified.
dkms.conf: Error! No ‘PACKAGE_VERSION’ directive specified.

Error! Bad conf file.
File: /var/lib/dkms/vboxhost/4.1.8/source/dkms.conf does not represent
a valid dkms.conf file.
dkms.conf: Error! No ‘DEST_MODULE_LOCATION’ directive specified.
dkms.conf: Error! No ‘PACKAGE_NAME’ directive specified.
dkms.conf: Error! No ‘PACKAGE_VERSION’ directive specified.
dkms.conf: Error! No ‘DEST_MODULE_LOCATION’ directive specified.
dkms.conf: Error! No ‘PACKAGE_NAME’ directive specified.
dkms.conf: Error! No ‘PACKAGE_VERSION’ directive specified.

Error! Bad conf file.
File: /var/lib/dkms/vboxdrv/3.2.2/source/dkms.conf does not represent
a valid dkms.conf file.
dkms.conf: Error! No ‘DEST_MODULE_LOCATION’ directive specified.
dkms.conf: Error! No ‘PACKAGE_NAME’ directive specified.
dkms.conf: Error! No ‘PACKAGE_VERSION’ directive specified.
dkms.conf: Error! No ‘DEST_MODULE_LOCATION’ directive specified.
dkms.conf: Error! No ‘PACKAGE_NAME’ directive specified.
dkms.conf: Error! No ‘PACKAGE_VERSION’ directive specified.

Error! Bad conf file.
File: /var/lib/dkms/vboxnetflt/3.2.2/source/dkms.conf does not represent
a valid dkms.conf file.
dkms.conf: Error! No ‘DEST_MODULE_LOCATION’ directive specified.
dkms.conf: Error! No ‘PACKAGE_NAME’ directive specified.
dkms.conf: Error! No ‘PACKAGE_VERSION’ directive specified.
dkms.conf: Error! No ‘DEST_MODULE_LOCATION’ directive specified.
dkms.conf: Error! No ‘PACKAGE_NAME’ directive specified.
dkms.conf: Error! No ‘PACKAGE_VERSION’ directive specified.

Error! Bad conf file.
File: /var/lib/dkms/vboxnetadp/3.2.2/source/dkms.conf does not represent
a valid dkms.conf file.
[ OK ]
* Trying to register the VirtualBox kernel modules using DKMS [ OK ]
* Starting VirtualBox kernel modules [ OK ]

To get rid of these messages I had to do two things:

To remove the references to the old Virtualbox version from dkms run the following commands (as described in this thread; make sure you use the version numbers from your error message!):

$ sudo rm /var/lib/dkms/vboxdrv/3.2.2/source
$ sudo ln -s /var/lib/dkms/vboxdrv/3.2.2/build /var/lib/dkms/vboxdrv/3.2.2/source
$ sudo dkms remove -m vboxdrv -v 3.2.2 –all

$ sudo rm /var/lib/dkms/vboxnetflt/3.2.2/source
$ sudo ln -s /var/lib/dkms/vboxnetflt/3.2.2/build /var/lib/dkms/vboxnetflt/3.2.2/source
$ sudo dkms remove -m vboxnetflt -v 3.2.2 –all

$ sudo rm /var/lib/dkms/vboxnetadp/3.2.2/source
$ sudo ln -s /var/lib/dkms/vboxnetadp/3.2.2/build /var/lib/dkms/vboxnetadp/3.2.2/source
$ sudo dkms remove -m vboxnetadp -v 3.2.2 –all

To get rid of the message regarding the current version of Virtualbox you want to upgrade to, you need to run these commands (as described here):

sudo mv /var/lib/dkms/vboxhost /var/lib/dkms/vboxhost.old
sudo /etc/init.d/vboxdrv setup

Although I did not test it I think it should be sufficient to just remove the existing vboxhost folder as described in the last step which should make the first step obsolete! At least now running the setup does no longer show any errors:

sudo /etc/init.d/vboxdrv setup
* Stopping VirtualBox kernel modules [ OK ]
* Uninstalling old VirtualBox DKMS kernel modules [ OK ]
* Removing old VirtualBox pci kernel module [ OK ]
* Removing old VirtualBox netadp kernel module [ OK ]
* Removing old VirtualBox netflt kernel module [ OK ]
* Removing old VirtualBox kernel module [ OK ]
* Trying to register the VirtualBox kernel modules using DKMS [ OK ]
* Starting VirtualBox kernel modules [ OK ]

 

 

Error messages during upgrade of Virtualbox on Ubuntu
Tagged on:         

Leave a Reply

Your email address will not be published. Required fields are marked *