Sur Ubuntu 18.04, j'ai quelques problèmes avec mon installation de CUDA, alors j'aimerais désinstaller CUDA et recommencer à zéro.
Donc, j'ai essayé ce qui suit :
sudo apt remove cuda
Mais cela a ensuite affiché ce qui suit :
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-1 : Depends: libcublas-dev (>= 10.2.1.243) but it is not going to be installed
cuda-samples-10-1 : Depends: libcublas-dev (>= 10.2.1.243) but it is not going to be installed
cuda-visual-tools-10-1 : Depends: libcublas-dev (>= 10.2.1.243) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Je suis très confus par cela. Il semble me dire que cuda-libraries-dev-10-1
, cuda-samples-10-1
et cuda-visual-tools-10-1
dépendent tous de libcublas-dev
, avec une version d'au moins 10.2.1.243. Et ensuite, il dit que cette version de libcublas-dev
ne va pas être installée. Mais j'essaie de désinstaller CUDA, pas de l'installer. Par conséquent, pourquoi mon système se soucie-t-il du fait que certains des packages fournis avec CUDA ont des dépendances non satisfaites, alors que j'essaie de supprimer ces packages de toute façon ?
Je peux comprendre que si j'essayais d'installer cuda-libraries-dev-10-1
, cuda-samples-10-1
ou cuda-visual-tools-10-1
, ce message aurait du sens. Mais si j'essaie de les supprimer, pourquoi est-ce important s'ils ont des dépendances non satisfaites ?
Mise à jour
Comme suggéré, j'ai également exécuté :
apt --fix-broken install
Cela a alors affiché :
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:
g++-6 libaccinj64-9.1 libcublas9.1 libcudart9.1 libcufft9.1 libcufftw9.1 libcuinj64-9.1 libcurand9.1 libcusolver9.1 libcusparse9.1 libnppc9.1 libnppial9.1 libnppicc9.1
libnppicom9.1 libnppidei9.1 libnppif9.1 libnppig9.1 libnppim9.1 libnppist9.1 libnppisu9.1 libnppitc9.1 libnpps9.1 libnvblas9.1 libnvgraph9.1 libnvrtc9.1 libnvtoolsext1 libnvvm3
libstdc++-6-dev libthrust-dev libvdpau-dev nvidia-cuda-dev nvidia-cuda-doc nvidia-cuda-gdb nvidia-opencl-dev nvidia-profiler nvidia-visual-profiler ocl-icd-opencl-dev
opencl-c-headers
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 62 not to upgrade.
83 not fully installed or removed.
Need to get 0 B/38.9 MB of archives.
After this operation, 109 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 file:/var/cuda-repo-10-1-local-10.1.243-418.87.00 libcublas-dev 10.2.1.243-1 [38.9 MB]
(Reading database ... 211122 files and directories currently installed.)
Preparing to unpack .../libcublas-dev_10.2.1.243-1_amd64.deb ...
Unpacking libcublas-dev (10.2.1.243-1) ...
dpkg: error processing archive /var/cuda-repo-10-1-local-10.1.243-418.87.00/./libcublas-dev_10.2.1.243-1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libcublas_static.a', 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-1-local-10.1.243-418.87.00/./libcublas-dev_10.2.1.243-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Mise à jour
Comme suggéré dans les commentaires, j'ai ensuite essayé d'exécuter :
sudo apt full-upgrade
Cela a affiché ce qui suit :
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-1 : Depends: libcublas-dev (>= 10.2.1.243) but it is not installed
cuda-samples-10-1 : Depends: libcublas-dev (>= 10.2.1.243) but it is not installed
cuda-visual-tools-10-1 : Depends: libcublas-dev (>= 10.2.1.243) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
C'est exactement le même affichage que lorsque j'ai exécuté sudo apt remove cuda
.
Mise à jour
Comme suggéré dans les commentaires, j'ai exécuté grep -r deb /etc/apt/sources.list /etc/apt/sources.list.d
. Cela a donné la sortie suivante :
/etc/apt/sources.list:#deb cdrom:[Ubuntu 18.04.3 LTS _Bionic Beaver_ - Release amd64 (20190805)]/ bionic main restricted
/etc/apt/sources.list:deb http://gb.archive.ubuntu.com/ubuntu/ bionic main restricted
/etc/apt/sources.list:# deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic main restricted
/etc/apt/sources.list:deb http://gb.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
/etc/apt/sources.list:# deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
/etc/apt/sources.list:deb http://gb.archive.ubuntu.com/ubuntu/ bionic universe
/etc/apt/sources.list:# deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic universe
/etc/apt/sources.list:deb http://gb.archive.ubuntu.com/ubuntu/ bionic-updates universe
/etc/apt/sources.list:# deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic-updates universe
/etc/apt/sources.list:deb http://gb.archive.ubuntu.com/ubuntu/ bionic multiverse
/etc/apt/sources.list:# deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic multiverse
/etc/apt/sources.list:deb http://gb.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
/etc/apt/sources.list:# deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
/etc/apt/sources.list:deb http://gb.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
/etc/apt/sources.list:# deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
/etc/apt/sources.list:# deb http://archive.canonical.com/ubuntu bionic partner
/etc/apt/sources.list:# deb-src http://archive.canonical.com/ubuntu bionic partner
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu bionic-security main restricted
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu bionic-security universe
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu bionic-security multiverse
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
/etc/apt/sources.list.d/cuda.list:deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /
/etc/apt/sources.list.d/cuda-10-0-local-10.0.130-410.48.list:deb file:///var/cuda-repo-10-0-local-10.0.130-410.48 /
/etc/apt/sources.list.d/cuda-10-1-local-10.1.243-418.87.00.list:deb file:///var/cuda-repo-10-1-local-10.1.243-418.87.00 /