Installing CUDA 5.5 on Ubuntu 12.04 is much easier than with earlier versions of CUDA.
1. Download the
.deb file that matches your 32-bit or 64-bit Ubuntu from here. For my system, it was
2. Uninstall the existing NVIDIA driver:
$ sudo /usr/bin/nvidia-uninstall
3. Install the
$ sudo gdebi cuda-repo-ubuntu1204_5.5-0_amd64.deb
This just adds a
cuda.list file to
/etc/apt/sources.list.d/. The URL inside
cuda.list for my 64-bit Ubuntu is
http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1204/x86_64. This will be used by
apt-get to get CUDA packages for installation.
4. Install CUDA packages:
$ sudo apt-get update $ sudo apt-get install cuda
5. Restart the computer. Hopefully, there is no problem with your drivers and you get the Ubuntu desktop.
6. Set the
LD_LIBRARY_PATH environment variables. I add this to my
export CUDA_ROOT=/usr/local/cuda-5.5 export PATH=$PATH:$CUDA_ROOT/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CUDA_ROOT/lib64
7. Compile and run your CUDA programs. They should work without errors 🙂
Tried with: Ubuntu 12.04 LTS