Installation of CUDA 6.0 on Debian Wheezy

Kernels & Hardware, configuring network, installing services

Installation of CUDA 6.0 on Debian Wheezy

Postby Loro_Mendes » 2014-05-21 13:25

Dear all, I need to install the CUDA on my computer and I would like to have your thoughts about the following procedure that I think it is right but I am not sure. After reading a lot of posts I figure it out that in order to install properly the CUDA I should do the following:

1) My version of Debian is Wheezy with:
Code: Select all
 uname -a
Debian 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3deb7u1 x86_64 GNU/Linux
gcc --version
gcc (Debian 4.7.2-5) 4.7.2

From the NVIDIA website I found that there are two versions for the DEB pkgt ( ... n-of-linux)
Distribution x86_64 ARM Kernel GCC GLIBC
Ubuntu 13.04 YES YES 3.8.0 4.7.3 2.17
Ubuntu 12.04 YES* YES 3.2.0 4.6 2.15

Which I think that I need to install the Ubuntu 12.04 due to the Kernel version and gcc (at this moment is cuda-repo-ubuntu1204_6.0-37_amd64.deb)

2) Reading the manual about the installations I figure it out that the pre-requisite is to uninstall the NVIDIA driver
Code: Select all

And here is the first question:
I installed the NVIDIA driver using the and due to some incompatibilities I had to
Code: Select all
aptitude purge xserver-xorg-video-nouveau

Which means, so far that I understand, that I have no other X server besides NVIDIA

According to the NVIDIA website there is an incompatibility
The package manager installations (RPM/DEB packages) and the stand-alone installer installations (.run file) of the NVIDIA driver are incompatible

Does anyone knows if is there an incompatibility or is there a minimum version of the driver needed ?

3) In case of necessary to uninstall the Driver so far as I understand, as I already purged the nouveau server I will be out of X server, which means that I need to uninstall it from the command line on a Crt+Alt+F1 tty, for instance, am I right?

4) After uninstall I need to
Code: Select all
dpkg -i cuda-repo-<distro>_<version>_<architecture>.deb
on the same directory of the *.deb file downloaded and
Code: Select all
apt-get update

Code: Select all
apt-get install cuda

Another question, after perform the install cuda and reboot the machine am I getting the NVIDIA drivers installed as well? and the X server back to normal?

5) The post installation, assuming that everything gone right, and I have my X server back again, I should add the following to the PATH
Code: Select all
export PATH=/usr/local/cuda-6.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-6.0/lib64:$LD_LIBRARY_PATH

But what happens when a new version comes? Should I update the PATH every time?

6) Verify the installation...

Did anyone do something similar? I am asking because I am new to Linux and even more to the CUDA and NVIDIA installations, although that I am going to get a lot of pain but I would like to minimize it...

Suggestions are welcome

Posts: 37
Joined: 2014-03-24 19:59

Re: Installation of CUDA 6.0 on Debian Wheezy - SOLVED

Postby Loro_Mendes » 2014-06-07 21:51

Ok guys, here is an update of the installation process...

Once I had installed the NVIDIA driver before I downloaded the and
Code: Select all
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 1
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 100

Because I had the gcc 4.7 installed on my laptop but not on the update-alternatives with
Code: Select all
update-alternatives --config gcc
I choose the 4.6, but I wouldn't need it. The reason for the 4.6 version is because in case of installation of the NVIDIA driver, accordingly to the installation procedure it is necessary to have it close to the one specified on the ( ... quirements)

I also installed the libraries suggested by the installation
Code: Select all
apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev

And on the tty1 terminal as root
Code: Select all
#chmod +x
# ./

After reading the license I hit the options
Code: Select all
y (unsupported)
n (NVIDIA driver - Previously installed)
y (install toolkit)
enter (default location)
y (simbolic link)
enter (default location)

Tested with the make and after with the following executables
deviceQuery and bandwidthTest

So far so good

I think that answering the questions posted before:

There is no need to uninstall the previously installed driver, once it is later then 331.00, which is the minimum requirement for the CUDA 6.0
Also I did'nt lost the X server

At the end it seams that the driver that came with the although is later (331.64) then the one that I have (331.49) I hadn't any issues so far...

I will post it as SOLVED for now at least
Posts: 37
Joined: 2014-03-24 19:59

Re: Installation of CUDA 6.0 on Debian Wheezy

Postby kosongduadua » 2014-09-09 06:03


Thanks! I'll follow your procedure.
I'll post here once I finished installing.
Posts: 1
Joined: 2014-09-09 05:59

Return to System configuration

Who is online

Users browsing this forum: No registered users and 11 guests