gcc 降级 - xd21303/Notebook GitHub Wiki
For CUDA 9:
sudo ln -s /usr/bin/gcc-6 /usr/local/cuda/bin/gcc
sudo ln -s /usr/bin/g++-6 /usr/local/cuda/bin/g++
You need to have gcc and g++ 6 installed first:
sudo apt install gcc-6 g++-6
https://stackoverflow.com/questions/6622454/cuda-incompatible-with-my-gcc-version