I'm having some trouble getting the CUDA development environment up and running on Ubuntu 14.04. I initially tried using the
nvidia-cuda-toolkit package from the repository, and although everything appeared to install correctly, a simple example where I initialized an array on the host, copied to the device, and copied back to a new array on the host, gave me uninitialized data. I asked about this on StackOverflow, and they suggested that I hadn't gotten my installation working properly (the example worked for them).
So, I started from scratch, going by the Linux Installation Guide, but I seem to have flubbed it all up. This time around I've run into an error at the
$ sudo apt-get install cuda step. I've noted down all the steps I took to get to the error:
- I seem to have a compatible device...
$ lspci | grep -i nvidia 01:00.0 VGA compatible controller: NVIDIA Corporation GF106GL [Quadro 2000] (rev a1) 01:00.1 Audio device: NVIDIA Corporation GF106 High Definition Audio Controller (rev a1)
- I'm running a supported version of Linux (Ubuntu 14.04, x86_64)
- Downloaded CUDA 7 for Ubuntu 14.04 (Local Package Installer)
- Since I've tried installing a few times already, I thought I would need to uninstall--but the uninstall scripts mentioned here (pages 6 to 7) weren't there, oddly. So I removed the CUDA directory from
$ sudo apt-get --purge remove nvidia-*instead.
$ sudo dpkg -i cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.debran without errors...
- ...as did
$ sudo apt-get update
$ sudo apt-get install cuda said gave me an unmet dependencies error:
Reading package lists... Done Building dependency tree Reading state information... Done cuda is already the newest version. You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies. cuda-drivers : Depends: nvidia-opencl-icd-346 (>= 346.46) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
$ sudo apt-get -f install, as it suggested, but then I get another error:
Preparing to unpack .../nvidia-opencl-icd-346_346.46-0ubuntu1_amd64.deb ... Unpacking nvidia-opencl-icd-346 (346.46-0ubuntu1) ... dpkg: error processing archive /var/cuda-repo-7-0-local/./nvidia-opencl-icd-346_346.46-0ubuntu1_amd64.deb (--unpack): trying to overwrite '/etc/OpenCL/vendors/nvidia.icd', which is also in package nvidia-opencl-icd-331 331.113-0ubuntu0.0.4 Errors were encountered while processing: /var/cuda-repo-7-0-local/./nvidia-opencl-icd-346_346.46-0ubuntu1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
I'm disconcerted that "CUDA is already at its newest version" after removing the directory from
/usr/local and purging the package manager. Also, I tried installing the offending OpenCL package (nvidia-opencl-icd-346) separately, but there was a non-zero exit status.
Thanks in advance for your help!