How to install CUDA 5.5 on Ubuntu

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 cuda-repo-ubuntu1204_5.5-0_amd64.deb

2. Uninstall the existing NVIDIA driver:

$ sudo /usr/bin/nvidia-uninstall

3. Install the .deb file:

$ 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 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 PATH and LD_LIBRARY_PATH environment variables. I add this to my .bashrc:

export CUDA_ROOT=/usr/local/cuda-5.5
export PATH=$PATH:$CUDA_ROOT/bin

7. Compile and run your CUDA programs. They should work without errors πŸ™‚

Tried with: Ubuntu 12.04 LTS

One thought on “How to install CUDA 5.5 on Ubuntu

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.