Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CUDA 7.5 installation: Unsupported compiler error

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?

like image 691
Amir Avatar asked Jan 08 '16 06:01

Amir


2 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
like image 164
Martinez Mariano Avatar answered Dec 09 '22 17:12

Martinez Mariano


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.

like image 26
Amir Avatar answered Dec 09 '22 18:12

Amir