The problem seems to be a missing or an erroneous declaration / erroneous call of the function vfs_readlink() in HgfsReadLink() in link.c:
/tmp/modconfig-NAS1rK/vmhgfs-only/link.c: In function ‘HgfsReadlink’:
/tmp/modconfig-NAS1rK/vmhgfs-only/link.c:186:10: error: implicit declaration of function ‘vfs_readlink’ [-Werror=implicit-function-declaration]
This might be fixed by editing one of the header files included in link.c or by editing link.c itself, but the easiest (and probably fastest) way would be to just patch the faulty file. There's this patcher around which between other vmware-tools bugs also specifically addresses your issue: Github.com: vmware-tools-patches.
I've checked the patches included and I found out that between those included specifically for your version of vmware-tools (9.6.2) two of them affect the offending function over two different kernels (04-vmblock-vfs_readlink-kernel-3.15-tools-9.6.2.patch > kernel 3.15 and 10-vmhgfs-vfs_readlink-kernel-3.16-tools-9.6.2.patch > kernel 3.16).
Since the vmware-tools installer you used messes with kernel modules, and since as you suggested some files probably have been written already during the previous attempt to install, considering furthermore that you have just reinstalled the system, instead of going through unnecessary headaches i highly suggest you to clean reinstall Ubuntu on the virtual machine once again before running the patcher and installing vmware-tools again.
Inside the virtual machine:
- Download and install
git: sudo apt-get install git
- Download the patcher/patches somewhere, let's say in
~/: cd ~/ && git clone https://github.com/rasa/vmware-tools-patches.git
- Move the
vmware-tools tarball to ~/vmware-tools-patches: cp ~/Downloads/<vmware_tools_tarball_name> ~/vmware-tools-patches
- Run the patcher:
cd vmware-tools-patches && ./untar-and-patch.sh
- Install
vmware-tools: ./compile.sh