CUDA 7.5 installation: Unsupported compiler error

24,675

Solution 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.

Solution 2

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
Share:
24,675
Amir
Author by

Amir

Doing research on building models that mimic human behavior. Hope to take steps towards building real AI models in the future GitHub

Updated on June 30, 2020

Comments

  • Amir
    Amir almost 4 years

    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?