Installing CUDA Toolkit 5.0 on Fedora 16 Linux
The following explains how to install CUDA Toolkit 5.0 on 64-bit Fedora 16 Linux. I have tested it on a self-assembled desktop with AMD Phenom II X4 CPU, 4GB RAM, 500GB hard drive, 650W power supply, and NVIDIA GeForce GTX 460 graphics card. The instruction assumes you have the necessary CUDA compatible hardware support and know how to use sudo. Depending on your system configuration, your mileage may vary.
Proprietary Video Driver
The built-in video driver in Fedora 16 is incompatible with the CUDA Toolkit, and you need to replace it with the proprietary NVIDIA driver. If you have not already done so, you should first configure your system with the RPM Fusion repository. Then install the proprietary driver in a terminal as follows.
Next, you should rebuild the kernel image.
And you can reboot the system at this point for the change to take effect.
Linux Development Tools
After you have successfully configured Fedora Linux with the proprietary NVIDIA driver, you can install the Linux development tools.
OpenGL Developer Driver
To prepare for compiling the OpenGL code samples in the CUDA SDK, you will have to install the OpenGL developer environment.
OpenMPI Developer Driver
Since there is a new MPI sample in the CUDA SDK, you will have to install the OpenMPI environment as well.
CUDA Toolkit
Download the CUDA Toolkit from the CUDA download site. The graphical display manager must not be running during the CUDA video driver install. Hence you should logout the desktop, and switch into console mode with the Alt+Ctrl+F2 keystroke. Then login the text console, and stop the graphical display manager with the following:
You may have to enter the same Alt+Ctrl+F2 keystroke again to resume the text console. Now install the CUDA Toolkit.
And reboot afterward:
Environment Variables
Assuming you have accepted the default install locations, you should add the following in the .bashrc file of your home folder.
export CUDA_HOME=/usr/local/cuda-5.0
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64
PATH=${CUDA_HOME}/bin:${OPENMPI_HOME}/bin:${PATH}
export PATH
CUDA SDK Samples
Now you can copy the SDK samples into your home directory, and proceed with the build process.
If everything goes well, you should be able to verify your CUDA installation by running the deviceQuery sample in bin/linux/release.