CUDA Installation failed

Hi,
I’m trying to setup My laptop for Unity+DL(It has a Gt-740M, I know, it’s too small but it’s a better option than a no GPU MacBook for Unity. I hope to get a better machine soon). But I’m not able to complete the GPU setup.
I’m trying to follow @Ekami’s tutorial on a fresh machine with Ubuntu 16.04 but after downloading the drivers, I get a “incomplete glvnd installation found error” during CUDA installation.

I’m letting the Cuda setup download the drivers, which didn’t work. Downloading the drivers from the system settings->Additional drivers produces the same error, the driver being downloaded is 384.90.

Do I have to install any dependencies before starting out with CUDA?

Sanyam