After having installed nvidia driver 367 by typing:

sudo add-apt-repository ppa:graphics-drivers/ppa -y
sudo apt-get update
sudo apt-get install nvidia-367 -y

and disabled Secure Boot in UEFI (BIOS) settings, I'm trying to install properly nvidia-cuda 8.0.

These were my steps (following this guide):

  1. from https://developer.nvidia.com/cuda-downloads I downloaded cuda_8.0.44_linux.run
  2. sudo mkdir /usr/local/cuda-8.0
  3. sudo ./cuda_8.0.44_linux.run --override
  4. in /etc/profile.d/cuda.sh: export PATH=$PATH:/usr/local/cuda/bin
  5. in /etc/ld.so.conf.d/cuda.conf: /usr/local/cuda/lib64
  6. sudo ldconfig
  7. Force cuda to work with gcc 5, commenting line 119 out in usr/local/cuda/include/host_config.h: //#error -- unsupported GNU version! gcc versions later than 5 are not supported!
  8. rsync -av /usr/local/cuda/samples in my cuda_samples/
  9. sudo GLPATH=/usr/lib make

However, when i type:

./nbody -benchmark -numbodies=256000

in samples/bin/x86_64/linux/release, I get this message:

Error: only 0 Devices available, 1 requested. Exiting.

Any help?

  • Apparently, CUDA works by installing its own version of NVIDIA driver (therefore, downgrading from nvidia-367.57). However, after rebooting I got stuck into the login loop.
    – Ale
    Nov 12, 2016 at 7:54

1 Answer 1


I partially solved this way:

  1. sudo apt-get --purge remove nvidia-*
  2. sudo service lightdm stop
  3. download nvidia driver NVIDIA-Linux-x86_64-367.57.run from the website
  4. sudo ./NVIDIA-Linux-x86_64-367.57.run --no-opengl-files
  5. sudo ./cuda_8.0.44_linux.run (you should not install its own nvidia-driver 367.48, as you have 367.57 already installed)
  6. in /usr/local/cuda-8.0/include/host_config.h, comment this line out: #error -- unsupported GNU version! gcc versions later than 5 are not supported!
  7. mkdir cuda_samples
  8. rsync -av /usr/local/cuda/samples .
  9. GLPATH=/usr/lib make
  10. reboot

And you get your cuda-8.0 enabled!

CAVEAT: As you got nvidia driver from the website, nvidia-settings doesn't work. I am trying now to figure out how to make nvidia-settings properly work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .