An R Introduction to Statistics

Installing CUDA Toolkit 7.5 on Fedora 21 Linux

The following explains how to install CUDA Toolkit 7.5 on 64-bit Fedora 21 Linux. I have tested it on a self-assembled desktop with NVIDIA GeForce GTX 550 Ti 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.

CUDA Repository

Retrieve the CUDA repository package for Fedora 21 from the CUDA download site and install it in a terminal.

$ sudo rpm -Uhv cuda-repo-fedora21-7.5-18.x86_64.rpm 
$ sudo yum clean expire-cache

RPMFusion Repository

The CUDA driver relies on an external software framework, and you have to download and configure the RPMFusion free repository for the package dependency.

$ sudo rpm -Uhv rpmfusion-free-release-21.noarch.rpm

Linux Development Tools

You also need to install the necessary background Linux tools.

$ sudo yum install gcc-c++ kernel-devel

CUDA Toolkit

Then you can install the CUDA Toolkit using yum.

$ sudo yum install cuda

You should reboot the system afterward and verify the driver installation with the nvidia-settings utility.

Environment Variables

As part of the CUDA environment, you should add the following in the .bashrc file of your home folder.

export CUDA_HOME=/usr/local/cuda-7.5 
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64 
 
PATH=${CUDA_HOME}/bin:${PATH} 
export PATH

CUDA SDK Samples

Now you can copy the SDK samples into your home directory, and build a test sample.

$ cuda-install-samples-7.5.sh  ~ 
$ cd ~/NVIDIA_CUDA-7.5_Samples 
$ cd 1_Utilities/deviceQuery 
$ make

If everything goes well, you should be able to verify your CUDA installation by running the deviceQuery sample.