Cuda5 on Ubuntu 12.10
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.
- I downloaded the Ubuntu 11.10 64bit installer from here http://developer.nvidia.com/cuda/cuda-downloads
- I moved the file to /root/ because my home folder is encrypted
- I restarted into recovery mode
- dropped to root shell
- I ran # mount -n -o remount,rw /
- moved to /root/ directory
- gave the downloaded file execute permissions
- I ran the file
- Only the driver installation succeeded, the other two, the SDK and the samples failed
- I rebooted my computer normally
- I installed gcc-4.6 (apt-get install gcc-4.6)
- changed directory to /usr/bin
- removed gcc (it's a symbolic link to gcc-4.7)
- created a symbolic link to gcc-4.6 (ln -s gcc-4.6 gcc)
- changed directory to /root/ and re-ran the downloaded file, only selecting yes to the SDK and samples
- The SDK succeeded, but the samples failed
- 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.
- I restarted my system
- I ran
- $ export LDLIBRARYPATH=/usr/local/cuda-5.0/lib:$LDLIBRARYPATH
- $ export LDLIBRARYPATH=/usr/local/cuda-5.0/lib:$LDLIBRARYPATH
- Then for my own tastes, I restarted boinc (# /etc/init.d/boinc-client restart)
- And Boinc was able to take advantage of the Cuda abilities, hence, it worked despite not getting the samples installed.
- 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.
- Lastly, I recreated the symbolic link in /usr/bin to gcc-4.7