以下方法适用于centos/Ubuntu

#新建一个临时目录,用于挂载光驱
mkdir /tmp/cdrom
mount -t iso9660 /dev/cdrom /tmp/cdrom
cp -r /tmp/cdrom/* /tmp/
tar -zxvf VMwareTools-10.3.2-9925305.tar.gz

#Ubuntu 安装 perl
sudo apt install perl
#Ubuntu安装gcc套件
apt-get install build-essential


#Centos安装perl
yum install perl
#Centos安装gcc
yum install gcc gcc-c++
#Centos安装内核头文件
sudo yum install "kernel-devel-uname-r == $(uname -r)"


./vmware-install.pl
输入yes
后面一路按回车键

reboot