Score:2

Ubuntu 20.04 CUDA 11.3 installation problem

pg flag

I have a problem with CUDA 11.3 installation, I have followed official CUDA installation guide from nvidia step by step, several times, I've also tried different nvidia drivers. But no matter what i try either nvidia-smi or nvcc are not functional.

This is what i get after last step in CUDA installation (sudo apt-get -y install cuda)

INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
Loading new nvidia-465.19.01 DKMS files...
Building for 5.15.0-58-generic
Building for architecture x86_64
Building initial module for 5.15.0-58-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-dkms-465.0.crash'
Error! Bad return status for module build on kernel: 5.15.0-58-generic (x86_64)
Consult /var/lib/dkms/nvidia/465.19.01/build/make.log for more information.
dpkg: error processing package nvidia-dkms-465 (--configure):
 installed nvidia-dkms-465 package post-installation script subprocess returned error exit status 10
Setting up libcusolver-dev-11-3 (11.1.2.109-1) ...
Setting up cuda-cupti-11-3 (11.3.111-1) ...
dpkg: dependency problems prevent configuration of cuda-drivers-465:
 cuda-drivers-465 depends on nvidia-dkms-465 (>= 465.19.01); however:
  Package nvidia-dkms-465 is not configured yet.

dpkg: error processing package cuda-drivers-465 (--configure):
 dependency problems - leaving unconfigured
Setting up cuda-cupti-dev-11-3 (11.3.111-1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of cuda-drivers:
 cuda-drivers depends on cuda-drivers-465 (= 465.19.01-1); however:
  Package cuda-drivers-465 is not configured yet.

dpkg: error processing package cuda-drivers (--configure):
 dependency problems - leaving unconfigured
Setting up cuda-libraries-dev-11-3 (11.3.1-1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of nvidia-driver-465:
 nvidia-driver-465 depends on nvidia-dkms-465 (= 465.19.01-0ubuntu1); however:
  Package nvidia-dkms-465 is not configured yet.

dpkg: error processing package nvidia-driver-465 (--configure):
 dependency problems - leaving unconfigured
Setting up cuda-visual-tools-11-3 (11.3.1-1) ...
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of cuda-runtime-11-3:
 cuda-runtime-11-3 depends on cuda-drivers (>= 465.19.01); however:
  Package cuda-drivers is not configured yet.

dpkg: error processing package cuda-runtime-11-3 (--configure):
 dependency problems - leaving unconfigured
Setting up cuda-samples-11-3 (11.3.58-1) ...
No apport report written because MaxReports is reached already
                                                              Setting up cuda-command-line-tools-11-3 (11.3.1-1) ...
dpkg: dependency problems prevent configuration of cuda-demo-suite-11-3:
 cuda-demo-suite-11-3 depends on cuda-runtime-11-3; however:
  Package cuda-runtime-11-3 is not configured yet.

dpkg: error processing package cuda-demo-suite-11-3 (--configure):
 dependency problems - leaving unconfigured
Setting up cuda-documentation-11-3 (11.3.111-1) ...
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of cuda-11-3:
 cuda-11-3 depends on cuda-runtime-11-3 (>= 11.3.1); however:
  Package cuda-runtime-11-3 is not configured yet.
 cuda-11-3 depends on cuda-demo-suite-11-3 (>= 11.3.58); however:
  Package cuda-demo-suite-11-3 is not configured yet.

dpkg: error processing package cuda-11-3 (--configure):
 dependency problems - leaving unconfigured
Setting up cuda-tools-11-3 (11.3.1-1) ...
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of cuda:
 cuda depends on cuda-11-3 (>= 11.3.1); however:
  Package cuda-11-3 is not configured yet.

dpkg: error processing package cuda (--configure):
 dependency problems - leaving unconfigured
Setting up cuda-toolkit-11-3 (11.3.1-1) ...
No apport report written because MaxReports is reached already
                                                              Setting alternatives
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for initramfs-tools (0.136ubuntu6.7) ...
update-initramfs: Generating /boot/initrd.img-5.15.0-58-generic
Errors were encountered while processing:
 nvidia-dkms-465
 cuda-drivers-465
 cuda-drivers
 nvidia-driver-465
 cuda-runtime-11-3
 cuda-demo-suite-11-3
 cuda-11-3
 cuda
E: Sub-process /usr/bin/dpkg returned an error code (1)

nvcc -V outputs:

Copyright (c) 2005-2021 NVIDIA Corporation
Built on Mon_May__3_19:15:13_PDT_2021
Cuda compilation tools, release 11.3, V11.3.109
Build cuda_11.3.r11.3/compiler.29920130_0

but when i try nvidia-smi i get:

Failed to initialize NVML: Driver/library version mismatch

after reboot:

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

reboot did not solve the problem either. Does anyone know the solution? Thank you in advance.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.