Jun
01
2007

Installing VMWare on Ubuntu 7.04

The default VMWare Player and Workstation distribution can’t be installed in Ubuntu 7.04 due to some kernel errors. This is the error message:

Extracting the sources of the vmmon module.Building the vmmon module.
Building for VMware Player 1.0.2 or 1.0.3 or VMware Workstation 5.5.2 or 5.5.3.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmmon-only'
make -C /lib/modules/2.6.20-gentoo-r6/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.20-gentoo-r6'
CC [M]  /tmp/vmware-config1/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config1/vmmon-only/linux/driver.c:85:
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘compat_exit’
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘exit_code’
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: warning: type defaults to ‘int’ in declaration of ‘_syscall1’
make[2]: *** [/tmp/vmware-config1/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config1/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.20-gentoo-r6'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config1/vmmon-only'
Unable to build the vmmon module.

What you have to do is:

  1. change dir to the installer directory, and enter /lib/modules/source
  2. untar vmmon.tar
    tar xvf vmmon.tar
  3. edit the file vmmon-only/include/compat_kernel.h, add the following preprocessor statements
    /*
     * compat_exit() provides an access to the exit() function. It must
     * be named compat_exit(), as exit() (with different signature) is
     * provided by x86-64, arm and other (but not by i386).
     */
    #define __NR_compat_exit __NR_exit
    #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
    static inline _syscall1(int, compat_exit, int, exit_code);
    #endif
  4. tar back the file
    mv vmmon.tar vmmon.orig.tar
    tar cvf vmmon.tar vmmon-only
  5. run vmware-config.pl again
    # sudo ./vmware-config.pl
    ...
    
    You can now run VMware Player by invoking the following command:
    "/opt/vmware/player/bin/vmplayer".
    
    Enjoy,
    
    --the VMware team
Written by Nanda Firdausi in: tips |

5 Comments »

  • Joshua Preston says:

    I installed VMWare prior to attempting this and changing the file didn’t do anything. I had to make the change, uninstall and reinstall VMWare to get mine working.

  • cabi says:

    Nanda, thank you for this article. This works fine for me :)
    cabi

  • Maxrom says:

    Thanks Joshua - I did the same thing. Tried installing it, got the error, applied the fix, tried it again and bang - same problem. After reading your note, I ran the wmware-uninstall.pl file, then reinstalled again, and it worked like a charm :)

  • Roman says:

    One can apply the patch to already installed version - the default directory for the sources is /usr/lib/vmware/modules/source/ if you haven’t changed the directory during the installation, anyway it is sort of $PREFIX/lib/vmware/modules/source.

    Thanks for the patch!

  • htr3n says:

    The relevant directory should be /lib/modules/source
    –> if you changed to VM distribution directory, the path should be lib/modules/source, instead of /lib/modules/source.

    But anyway, it worked for me (at least I can compile the VM-server 1.0.2 on Ubuntu 7.04).
    Thanks

RSS feed for comments on this post. TrackBack URL


Leave a Reply

Powered by WordPress. Theme: TheBuckmaker. PHP Scripts, OpenID