Sunday, November 27, 2016

nvidia - How do I Install CUDA on Ubuntu 18.04?



Is there any tutorial to install CUDA on Ubuntu 18.04?



The instructions on the Nvidia website for 17.04 and 16.04 do not work for 18.04.



I get a message telling me to reboot then re-run the installer. However when I do this I get that same message again.




I have installed CUDA 9.1 on Ubuntu 18.04, and runs very well.



However, I should modify default gcc, g++, and use .run files instead of .deb files.




  1. install gcc-6, g++-6 (CUDA requires gcc-6 !)

  2. In /usr/bin as root, rm gcc, gcc-ar, gcc-nm, gcc-ranlib g++,
    then ln -s gcc-6 gcc; ln -s gcc-ar-6 gcc-ar; ln -s gcc-nm-6 gcc-nm; ln -s gcc-ranlib-6 gcc-ranlib;
    and ln -s g++-6 g++


  3. install CUDA using .run files. You may not istall driver. Instead, install
    the latest driver(if required, download NVIDIA-Linux-xxxxxxx.run from Nvidia) would be better.



That's all.



I've tried to install using .deb files, but it causes package conflict so that I've changed the way.



Enjoy it!!


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...