Unmet dependencies after installing CUDA 10.2
Ok, I was able to find a solution online:
1) I switched prime profiles to intel. 2) moved cuda.list file somewhere else (the 10.2 version that I had installed) 3) Commented lines in .bashrc where it pointed path to cuda 10.2 (not sure if necessary) 4) rebooted 5) $ sudo apt --fix-broken install
(and that worked this time!)
6) switched prime profile back to nvidia 7) uncommented lines in .bashrc (reverse step 3) 8) $ source .bashrc
And it worked. I have now cuda 10.2 installed and apt no longer has broken dependencies. :-)
Related videos on Youtube
Filipe Junqueira
I like boats and stuff that floats on water. I try to code but I'm bad... I'm a PhD student at the University of Nottingham. My area of research is artificial intelligence applied to single atom manipulation using a dynamic force microscopy aka non-contact atomic force microscopy.
Updated on September 18, 2022Comments
-
Filipe Junqueira over 1 year
I tried installing cuda 10.2 using apt. Halfway the installation there was an error. I was able to directly install running the .run file from the Nvidea website. However now when doing:
$ sudo apt upgrade
Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies. cuda-libraries-dev-10-2 : Depends: libcublas-dev (>= 10.2.2.89) but it is not installed cuda-samples-10-2 : Depends: libcublas-dev (>= 10.2.2.89) but it is not installed cuda-visual-tools-10-2 : Depends: libcublas-dev (>= 10.2.2.89) but it is not installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Then when doing:
$ sudo apt --fix-broken install
I get:
Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: libllvm7 libllvm7:i386 libnvidia-common-390 libwayland-client0:i386 libwayland-server0:i386 Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: libcublas-dev The following NEW packages will be installed libcublas-dev 0 to upgrade, 1 to newly install, 0 to remove and 33 not to upgrade. 62 not fully installed or removed. Need to get 0 B/42.3 MB of archives. After this operation, 114 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 file:/var/cuda-repo-10-2-local-10.2.89-440.33.01 libcublas-dev 10.2.2.89-1 [42.3 MB] (Reading database ... 473743 files and directories currently installed.) Preparing to unpack .../libcublas-dev_10.2.2.89-1_amd64.deb ... Unpacking libcublas-dev (10.2.2.89-1) ... dpkg: error processing archive /var/cuda-repo-10-2-local-10.2.89-440.33.01/./libcublas-dev_10.2.2.89-1_amd64.deb (--unpack): trying to overwrite '/usr/include/nvblas.h', which is also in package nvidia-cuda-dev 9.1.85-3ubuntu1 dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) Errors were encountered while processing: /var/cuda-repo-10-2-local-10.2.89-440.33.01/./libcublas-dev_10.2.2.89-1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
When doing:
$nvcc --version
I get:
nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2019 NVIDIA Corporation Built on Wed_Oct_23_19:24:38_PDT_2019 Cuda compilation tools, release 10.2, V10.2.89
Any ideas on how to fix the broken packages?
-
sam over 4 yearsHello @Flilpe . Could you give the full path cuda.list.
-
rob over 3 yearsCould you please post the commands you used to execute these steps?