ERROR: Unable to load the kernel module 'nvidia.ko'

On a new Amazon EC2 g2.2xlarge GPU instance running Ubuntu Server 14.04 LTS, I cannot install the latest NVIDIA GRID driver. When trying to install the driver, I encounter the following error:

How can I resolve this error and proceed with installing the driver? The output below shows the OS version on the EC2 instance.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.2 LTS
Release:        14.04
Codename:       trusty

Here’s the nvidia-installer.log mentioned in the error message.

Can’t read the .log the connection times out.

Have you disabled the nouveau driver?

have you checked the gcc version used by the driver package (installed on the Server) is the same one used to create the server kernel?

You may need to change the version of gcc in the VM to match.

You may also find this useful

http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/