My UBUNTU 13.10 64bits system (uname -a
):
Linux gpia 3.11.0-18-generic #32-Ubuntu SMP Tue Feb 18 21:11:14 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
The way I've installed CUDA Toolkit 5.5:
1 - In System Settings -> Software & Updates -> Additional Drives, select:
SELECT: Using NVIDIA binary Xorg driver, kernel module and VDPAU library from
nvidia-319-updates
(proprietary)
This gave me NVIDIA driver version 319.60 (it needs to be >= 319.37).
2 - Install gcc-4.6:
sudo apt-get install gcc-4.6
3 - Use update-alternatives to handle gcc versions (as stated by banskt):
sudo update-alternatives --remove-all gcc
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 1
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 100
sudo update-alternatives --config gcc
and choose gcc-4.6.
4 - Install some sutff to avoid missing libraries from CUDA samples (libGLU.so
, libX11.so
, libXi.so
, libXmu.so
):
sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa-dev
5 - Install CUDA Toolkit, previously downloaded from NVIDIA site (RUN version 12.10 64 bits: developer.download.nvidia.com/compute/cuda/5_5/rel/installers/cuda_5.5.22_linux_64.run)
sudo sh cuda_5.5.22_linux_64.run
Answers: accept
, y
(unsupported), n
(NVIDIA driver), y
(install toolkit), enter (default location), y
(samples), enter (default location)
6 - With update-alternatives, return to gcc-4.8:
sudo update-alternatives --config gcc
7 - Add the CUDA binaries and lib path to your PATH and LD_LIBRARY_PATH environment variables:
PATH: =======================================
cd /etc/profile.d
sudo vi cuda-5.5_bin.sh
#inside file:
export PATH=$PATH:/usr/local/cuda-5.5/bin
=============================================
LD_LIBRARY_PATH: ============================
cd /etc/ld.so.conf.d
sudo vi cuda-5.5.conf
#inside file:
/usr/local/cuda-5.5/lib
/usr/local/cuda-5.5/lib64
=============================================
8 - Log out your system and log in again. Test with nvcc --version
or compile and run the following simple example codes: first.cu, sumvec.cu with nvcc filename.cu -o filename.exec
.
Have a nice CUDA time :-D