sudo apt-get install gcc-4.8
sudo update-alternatives --remove-all gcc
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10
sudo apt-get install g++-4.8
sudo update-alternatives --remove-all g++
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 10
sudo apt-get install
gfortran
-4.8
sudo update-alternatives --remove-all
gfortran
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-4.8 10
http://stackoverflow.com/questions/34670989/cuda-7-5-installation-unsupported-compiler-error