To install Cuda5 on Ubuntu 12.10 I needed to do a few extra things. Below are the steps I took, there are improvements I suspect what could be made, but I will present instead what worked for me. If I were to do it again I suspect I would do it slightly more efficiently. I did this for the purposes of using Boinc, and used Boinc to test that it works. I was not able to install the samples but this seems to not be an issue.

  1. I downloaded the Ubuntu 11.10 64bit installer from here http://developer.nvidia.com/cuda/cuda-downloads
  2. I moved the file to /root/ because my home folder is encrypted
  3. I restarted into recovery mode
  4. dropped to root shell
  5. I ran # mount -n -o remount,rw /
  6. moved to /root/ directory
  7. gave the downloaded file execute permissions
  8. I ran the file
  9. Only the driver installation succeeded, the other two, the SDK and the samples failed
  10. I rebooted my computer normally
  11. I installed gcc-4.6 (apt-get install gcc-4.6)
  12. changed directory to /usr/bin
  13. removed gcc (it's a symbolic link to gcc-4.7)
  14. created a symbolic link to gcc-4.6 (ln -s gcc-4.6 gcc)
  15. changed directory to /root/ and re-ran the downloaded file, only selecting yes to the SDK and samples
  16. The SDK succeeded, but the samples failed
  17. I was not able to get the samples to work, in my random attempts to fix this I tried to install: libglut-dev,  libglew-dev and freeglut3-dev. I don't think these did anything, I can't even remember if all of them exist, I am just including this for completeness.
  18. I restarted my system
  19. I ran
    • $ export LDLIBRARYPATH=/usr/local/cuda-5.0/lib:$LDLIBRARYPATH
    • $ export LDLIBRARYPATH=/usr/local/cuda-5.0/lib:$LDLIBRARYPATH
  20. Then for my own tastes, I restarted boinc (# /etc/init.d/boinc-client restart)
  21. And Boinc was able to take advantage of the Cuda abilities, hence, it worked despite not getting the samples installed.
  22. I will still need to add the export commands to ~/.bashprofile or something similar. I say something similar because /etc/init.d/boinc-client seems to run before ~/.bashprofile and thus doing this requires you to restart boinc after startup. This however, is something for my to do list.
  23. Lastly, I recreated the symbolic link in /usr/bin to gcc-4.7