I assume you already installed NVIDIA’s driver supporting CUDA 2.3.
The first thing to do is to disable all Desktop effects otherwise some sample programs using OpenGL will crash your Desktop. Do to this go in the System->Preference->Apperance menu, select the ‘Visual Effects’ tab and set it to ‘none’.
Install the CUDA toolkit and CUDA SDK following NVIDIA’s ‘Getting started guide’. In order to compile the SDK examples you will need several utilities and libraries not present with the default installation of Ubuntu. Although I’m showing the apt-get commands the same can be achieved with Ubuntu’s graphical package manager found in ‘System->Administration->Synaptic Package Manager’.
- Missing g++ compiler: run ‘sudo apt-get install g++’ in a terminal window
make[1]: Entering directory `/home/username/NVIDIA_GPU_Computing_SDK/C/common’
make[1]: g++: Command not found
make[1]: *** [obj/release/bank_checker.cpp.o] Error 127
make[1]: Leaving directory `/home/username/NVIDIA_GPU_Computing_SDK/C/common’
make: *** [lib/libcutil.so] Error 2
- Missing OpenGL/Glut header files: run ‘sudo apt-get install glutg3-dev’
make[1]: Entering directory `/home/username/NVIDIA_GPU_Computing_SDK/C/common’
In file included from ./../common/inc/paramgl.h:24,
from src/paramgl.cpp:19:
./../common/inc/GL/glut.h:60:20: error: GL/glu.h: No such file or directory
make[1]: *** [obj/release/paramgl.cpp.o] Error 1
make[1]: Leaving directory `/home/username/NVIDIA_GPU_Computing_SDK/C/common’
make: *** [lib/libparamgl.so] Error 2
- Missing Xi library: run ‘sudo apt-get install libxi-dev’
/usr/bin/ld: cannot find -lXi
collect2: ld returned 1 exit status
make[1]: *** [../../bin/linux/release/smokeParticles] Error 1
make[1]: Leaving directory `/home/username/NVIDIA_GPU_Computing_SDK/C/src/smokeParticles’
- Missing Xmu library: run ‘sudo apt-get install libxmu-dev’
/usr/bin/ld: cannot find -lXmu
collect2: ld returned 1 exit status
make[1]: *** [../../bin/linux/release/smokeParticles] Error 1
make[1]: Leaving directory `/home/username/NVIDIA_GPU_Computing_SDK/C/src/smokeParticles’
make: *** [src/smokeParticles/Makefile.ph_build] Error 2