Skip to content

Instantly share code, notes, and snippets.

@iAmG-r00t
Created August 26, 2022 23:10
Show Gist options
  • Save iAmG-r00t/d26acfde671445c032c4e3f45c8e54e6 to your computer and use it in GitHub Desktop.
Save iAmG-r00t/d26acfde671445c032c4e3f45c8e54e6 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Credits someone on StackOverflow
# Allows you to fix the new kernel issue to make VMware work correctly.
# Get the current VMware version
VMWARE_VERSION="workstation-$(vmware -v|grep -oE "[[:digit:]]+.[[:digit:]]+.[[:digit:]]+"| head -n1)" # this is detect the version you have VMware Workstation 16.2.1 build-18811642
echo -e "\nCurrent VMWARE Version: $VMWARE_VERSION\n"
TMP_FOLDER="/tmp/patch-vmware"
rm -fdr $TMP_FOLDER
mkdir -p $TMP_FOLDER
cd "$TMP_FOLDER" || return
git clone https://github.com/mkubecek/vmware-host-modules.git
cd "$TMP_FOLDER"/vmware-host-modules || return
#git checkout workstation-16.2.1
git checkout "$VMWARE_VERSION"
git fetch
make
sudo make install
sudo rm /usr/lib/vmware/lib/libz.so.1/libz.so.1
sudo ln -s /lib/x86_64-linux-gnu/libz.so.1 /usr/lib/vmware/lib/libz.so.1/libz.so.1
sudo /etc/init.d/vmware restart
rm -fdr $TMP_FOLDER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment