What worked for me (Xubuntu Raring 64):

1) remove everything that belongs to older virtualbox version than 4.22 (that I 
use), especially in:
 /usr/src
and in
/var/lib/dkms
Basically, I only have:

$ ls /usr/src/
linux-headers-3.8.0-2  linux-headers-3.8.0-2-generic  vboxguest-4.2.6

$ ls /var/lib/dkms/
dkms_dbversion  vboxguest  virtualbox

$ ls /var/lib/dkms/vboxguest/
4.2.6  kernel-3.8.0-2-generic-x86_64

2) make sure that this is a softlink:

$ ls -ald /usr/src/vboxguest-4.2.6
lrwxrwxrwx 1 root root 49 Jan 24 17:28 /usr/src/vboxguest-4.2.6 -> 
/opt/VBoxGuestAdditions-4.2.6/src/vboxguest-4.2.6

3) apply patch shown in #3 to the file:

/opt/VBoxGuestAdditions-4.2.6/src/vboxguest-4.2.6/vboxguest/VBoxGuest-
linux.c

4) run this one-liner to rebuild all dkms modules

$ ls /var/lib/initramfs-tools | sudo xargs -n1
/usr/lib/dkms/dkms_autoinstaller start

Let me know if it works for you.

PS My setup is:

$ uname -a
Linux vmxubuntu 3.8.0-2-generic #6-Ubuntu SMP Fri Jan 25 22:03:57 UTC 2013 
x86_64 x86_64 x86_64 GNU/Linux

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1101867

Title:
  virtualbox-guest-dkms 4.1.22-dfsg-0ubuntu2: virtualbox-guest kernel
  module failed to build [VBoxGuest-linux.c:206:49: error: expected ‘=’,
  ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_VBoxGuestPciId’]

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/1101867/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to