If you are running Ubuntu 12.10 and want to install CUDA as mentioned in one of my earlier posts by default you can’t due to gcc 4.7 beeing incompatible with every availiable ( up to the time of writing this ) CUDA SDK

The good news is that you can work around this by installing an older version of the gcc compiler , and the even better news is that you can do everything with two small scripts I wrote that handle all the fuss for you and that you can download below..
Please note that the scripts will automatically check your machine capabilities ( x64 x86 ) , download the SDK you want from NVIDIA if you dont have it , and even set-up the correct LD_LIBRARY_PATH and PATH strings on your .bashrc file.. :P
Come on , what more can you ask for ?

I strongly suggest not downloading new drivers when the CUDA installation will ask you for it but use your distribution packaged ones (nvidia-current).. The repository drivers on Ubuntu 12.10 are fully equiped for CUDA so there is no reason to change them . You should also be aware that if you are running on an Optimus Laptop GPU ( see an older post here on configuring bumblebee for optimus cards ) installing standalone new drivers will most likely break your graphics setup.. So once again this time specifically you Optimus users dont download new drivers when the cuda installation asks you because you will break graphics on your Ubuntu installation :P
Also in case you are curious Optimus systems ( just like mine :P ) will run the script with no problems just as the rest of the NVIDIA systems .. The only difference on Optimus Chips is that after you compile an executable with nvcc you will have to run it using optirun ./yourexecutable ..

CUDA 5 ( if you want to take a look on the script click here )
To install CUDA5 type the following commands on your terminal :
wget https://raw.github.com/AmmarkoV/MyScripts/master/Setup/install_cuda5
chmod +x install_cuda5

CUDA 4.2 ( if you want to take a look on the script click here )
To install CUDA4.2 type the following commands on your terminal :
wget https://raw.github.com/AmmarkoV/MyScripts/master/Setup/install_cuda4.2
chmod +x install_cuda4.2

Comments are closed.