How to install latest version of CUDA on Ubuntu 18.04

I tried to install CUDA on Ubuntu but got errors.

I follow official guide for installation. And actually I succeed on my own mac. But on ubuntu 18.04 machine, when I tried to test those samples, it showed that no CUDA-capable device detected, but actually there is an nvidia GPU, GTX470. Also, "nvidia-smi" command doesn't work, saying can't find the CUDA driver, but actually, if we run apt-get install cuda driver, it showed that cuda driver is already installed. You may check the error image:

Error message

2

1 Answer

Use the installation guide provided here by eromod. This worked for me on 18.04 on different computers, other than the official version.

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo ubuntu-drivers autoinstall

reboot

sudo apt install nvidia-cuda-toolkit gcc-6
nvcc --version
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like