VMWare stopped working after I upgraded. (VMware Kernel Module Updater)

8,222

This solution was taken from this answer. However, that answer is still not marked as accepted, but it worked for me.

Run the following script:

#!/bin/bash
if [[ $UID != 0 ]]; then
    echo "Please run this script with sudo:"
    echo "sudo $0 $*"
    exit 1
fi

sudo ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/version.h

cd /usr/lib/vmware/modules/source
sudo tar -xf vmci.tar
cd vmci-only/linux
sudo sed '127s/.*/   .remove = vmci_remove_device,/' driver.c > driver.c.tmp
mv driver.c.tmp driver.c
sudo sed '1753s/.*/static int/' driver.c > driver.c.tmp
mv driver.c.tmp driver.c
sudo sed '1981s/.*/static void/' driver.c > driver.c.tmp
mv driver.c.tmp driver.c
cd ../..
sudo tar -cf vmci.tar vmci-only/
sudo rm vmci-only/ -Rf
sudo vmware-modconfig --console --install-all
sudo rm /usr/src/linux-headers-$(uname -r)/include/linux/version.h
echo "Done"
Share:
8,222
user2374083
Author by

user2374083

Updated on September 18, 2022

Comments

  • user2374083
    user2374083 almost 2 years

    It asks for the newest kernel headers (3.8.0-21-generic), so I downloaded them. After pointing to the new path for the file it still does not work. I have tried many solutions but none were successful. This is my first time posting a question, so please tell me if you need more information. Thanks in advance!

    I have followed [these instructions] (Unable to start VMWare Workstation after upgrade to 13.04) but "sudo ln -s ../generated/uapi/linux/version.h" yields, "ln: failed to create symbolic link ‘./utsrelease.h’: File exists". So I ran, "sudo ln -sf ../generated/uapi/linux/version.h" but it doesn't appear to do anything.


    I tried https://askubuntu.com/a/296551/159739 but I get, "ln: failed to create symbolic link ‘./version.h’: File exists"


    UPDATE:

    Now when I try to launch VMware a pop up reads, "Before you can run VMware, several modules must be compiled and loaded into the running kernel." CANCEL/INSTALL. When I select to install it just closes.

    • grimpitch
      grimpitch about 11 years
      Did you install the headers with apt-get? Exactly how? By the way, it's 3.8.0-21-generic.
    • user2374083
      user2374083 about 11 years
      Thanks grimpitch -- No, I used the synaptic package manager.
    • user2374083
      user2374083 about 11 years
      Also, I should add...This has happened every time the kernel has updated. Which used to be fine, downloading the headers from the synaptic package manager sufficed. However now it appears to be useless.
    • Aniket Thakur
      Aniket Thakur over 10 years
      You may want to try various ways mentioned in this answer askubuntu.com/questions/286326/…