web-dev-qa-db-fra.com

Dépendances non satisfaites après l'installation de CUDA 10.2

J'ai essayé d'installer cuda 10.2 en utilisant apt. A mi-parcours de l'installation, une erreur s'est produite. J'ai pu installer directement en exécutant le fichier .run à partir du site Web Nvidea. Mais maintenant, en faisant:

$ 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).

Puis en faisant:

$ Sudo apt --fix-broken install

Je reçois:

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)

En faisant:

$nvcc --version

Je reçois:

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

Des idées sur la façon de réparer les paquets cassés?

2
Filipe Junqueira

Ok, j'ai pu trouver une solution en ligne:

1) J'ai changé les profils principaux en intel. 2) déplacé le fichier cuda.list ailleurs (la version 10.2 que j'avais installée) 3) Lignes commentées dans .bashrc où il indiquait le chemin vers cuda 10.2 (pas sûr si nécessaire) 4) redémarré 5) $ Sudo apt --fix- installation cassée

(et cela a fonctionné cette fois!)

6) profil principal commuté de nouveau à nvidia 7) lignes non commentées dans .bashrc (étape inverse 3) 8) $ source .bashrc

Et ça a marché. J'ai maintenant installé cuda 10.2 et apt n'a plus de dépendances cassées. :-)

1
Filipe Junqueira