Search This Blog

Wednesday, 3 September 2014

Install Cuda 6.5 under Ubuntu 12.04

You can check first you version of Ubuntu with

lsb_release -a

and your nvidia card with

lspci |grep NVIDIA

After this you can download the driver from

To install it, follow the next steps

cd Download
sudo chmod 777 -R

if you have 64 linux version like me, or you have to choose your flavor.


sudo apt-get update
sudo apt-get upgrade

Install all these libraries

sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev libglu1-mesa glew-utils mesa-utils

Modify the next file

sudo gedit /etc/modprobe.d/blacklist.conf

write down at the end of the file the next list

blacklist amd76x_edac
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv

save and close the file and then type:

sudo apt-get remove --purge nvidia*
sudo apt-get remove --purge xserver-xorg-video-nouveau
sudo reboot

After that


Enter your login and pass and then type

sudo lightdm stop

enter your pass again.
After this the driver has to start, choose yes for everything except for the last question about the Xorg file.

When this finishes, get in to the graphic mode with

sudo lightdm start

If everything goes right you can go for CUDA.

Download 6.5 version at

I got the file

in the Downloads archive.

Again type


Enter your login and pass and then type

sudo lightdm stop

chmod 777 -R

and sudo sh chmod 777 -R

Accept all the options

sudo lightdm start

Run a terminal and type

sudo gedit .bashrc

for 32 bits include these lines:
export PATH=/usr/local/cuda-6.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-6.5/lib:$LD_LIBRARY_PATH

and for 64 bits:
export PATH=/usr/local/cuda-6.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-6.5/lib:/usr/local/cuda-6.5/lib64:$LD_LIBRARY_PATH

and save the changes.

There you go.