I just tried installing CUDA 7.5 on my laptop. I disabled lightdm
and did sudo sh cuda7.5.run
. The driver installation passed but then I got an error Unsupported compiler ...
and the installation fails. How can I resolve this issue?

- 10,600
- 9
- 48
- 75
-
3switch to a supported configuration. Supported configurations are covered in [the documentation](http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#system-requirements). If you are using ubuntu 15.10 (as your question is tagged), that is an unsupported configuration for CUDA 7.5 – Robert Crovella Jan 08 '16 at 07:31
-
It is still possible to install CUDA on an unsupported configuration. Try to install gcc-4.8 and all the other required dependencies (like linux-headers etc.) Set gcc-4.8 as default compiler (something similar to the following cd /usr/bin rm cc gcc c++ g++ ln -s /usr/local/bin/gcc-4.8 cc ln -s /usr/local/bin/gcc-4.8 gcc ln -s /usr/local/bin/c++-4.8 c++ ln -s /usr/local/bin/g++-4.8 g++ `). Then try to install again. – Davide Spataro Jan 08 '16 at 11:15
-
The issue is resolved now – Amir Jan 08 '16 at 22:48
4 Answers
I had a similar issue installing CUDA 7.5 in Ubuntu 16.04.
I've solved it using gcc/g++ 4.8 instead of 5.2.
You can install it and switch the default version using the command update-alternatives --install
For gcc 4.8 do:
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
For g++ 4.8 do:
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

- 1
- 1

- 541
- 8
- 19
-
for the g++, the first command line is wrong use `sudo apt-get install gcc-4.8` instead. – herve Jul 27 '16 at 16:19
-
1
-
1
The problem was with Ubuntu 15.10
. I installed 14.04
and could install CUDA. However, for my laptop there was a subtle point to mention. I had to install the NVIDIA driver via System Settings --> Software & Updates --> Additional Drivers
and selecting the tested
driver. Then I installed CUDA and answered No
to driver installation bundled with CUDA installation file.

- 10,600
- 9
- 48
- 75
You do not need to downgrade your gcc version. For the people who want to keep their gcc version, I recommend you use the following way. http://kislayabhi.github.io/Installing_CUDA_with_Ubuntu/

- 57
- 1
- 6