Install CUDA 6.5 on clean Ubuntu 14.04

Lately NVIDIA added repository for Ubuntu 12.04 and Ubuntu 14.04. Recently I hit problem with missing dependencies for libcheese-gtk23 and libcheese7 libraries while installing latest CUDA 6.5 on clean Ubuntu 14.04. Remedy to this can be found on askubuntu. So, the complete set of commands is presented below.

At first, add CUDA repository package:

sudo dpkg -i cuda-repo-ubuntu1404_6.5-14_amd64.deb

Now, install CUDA:

sudo apt-get update && sudo apt-get upgrade

# install nvidia driver
sudo apt-get install nvidia-current
# at this point you need to reboot computer

# remove broken packages, beware: some GUI parts of your system will be broken or removed
sudo apt-get remove libcheese*

# install CUDA
sudo apt-get install cuda

# restore broken GUI parts
sudo apt-get install ubuntu-desktop

By the way, libcheese is library for video and photo capturing, including enumeration of capturing devices.