I'm trying to install cuda 10.1 in my ubuntu 20.04 system. I looked this up on the official nvidia website. However, the cuda version that I need is not available for ubuntu version I have. So, I thought to continue with intsallation process for ubuntu 18. The link that I used is
https://developer.nvidia.com/cuda-10.1-download-archive-update2?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804&target_type=deblocal .
During last step I got the following error.
Errors were encountered while processing:
nvidia-dkms-418
nvidia-driver-418
cuda-drivers
cuda-runtime-10-1
cuda-demo-suite-10-1
cuda-10-1
cuda
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried answer accepted in this post https://askubuntu.com/a/1119232/1191829 but still got the same error. Can anybody please provide me the solution?
Full traceback for the original error
Reading package lists... Done
Building dependency tree
Reading state information... Done
cuda is already the newest version (10.1.243-1).
The following packages were automatically installed and are no longer required:
g++-8 libaccinj64-10.1 libatomic1:i386 libbsd0:i386 libcublaslt10 libcudart10.1 libcufft10 libcufftw10 libcupti-dev libcupti-doc libcupti10.1
libcurand10 libcusolver10 libcusolvermg10 libcusparse10 libdrm-amdgpu1:i386 libdrm-intel1:i386 libdrm-nouveau2:i386 libdrm-radeon1:i386
libdrm2:i386 libedit2:i386 libelf1:i386 libexpat1:i386 libffi7:i386 libgl1:i386 libgl1-mesa-dri:i386 libglapi-mesa:i386 libglvnd0:i386
libglx-mesa0:i386 libglx0:i386 libllvm11:i386 libncurses5 libnppc10 libnppial10 libnppicc10 libnppicom10 libnppidei10 libnppif10 libnppig10
libnppim10 libnppist10 libnppisu10 libnppitc10 libnpps10 libnvblas10 libnvgraph10 libnvjpeg10 libnvrtc10.1 libnvtoolsext1 libnvvm3
libpciaccess0:i386 libsensors5:i386 libstdc++-8-dev libstdc++6:i386 libthrust-dev libtinfo5 libvdpau-dev libvulkan1:i386 libwayland-client0:i386
libx11-6:i386 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386 libxcb-randr0:i386
libxcb-sync1:i386 libxcb-xfixes0:i386 libxcb1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386 libxshmfence1:i386
libxxf86vm1:i386 mesa-vulkan-drivers:i386 ocl-icd-libopencl1 ocl-icd-opencl-dev opencl-c-headers openjdk-8-jre
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
7 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up nvidia-dkms-418 (418.87.00-0ubuntu1) ...
update-initramfs: deferring update (trigger activated)
A modprobe blacklist file has been created at /etc/modprobe.d to prevent Nouveau
from loading. This can be reverted by deleting the following file:
/etc/modprobe.d/nvidia-graphics-drivers.conf
A new initrd image has also been created. To revert, please regenerate your
initrd by running the following command after deleting the modprobe.d file:
`/usr/sbin/initramfs -u`
*****************************************************************************
*** Reboot your computer and verify that the NVIDIA graphics driver can ***
*** be loaded. ***
*****************************************************************************
INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
Removing old nvidia-418.87.00 DKMS files...
------------------------------
Deleting module version: 418.87.00
completely from the DKMS tree.
------------------------------
Done.
Loading new nvidia-418.87.00 DKMS files...
Building for 5.8.0-59-generic
Building for architecture x86_64
Building initial module for 5.8.0-59-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-kernel-source-418.0.crash'
Error! Bad return status for module build on kernel: 5.8.0-59-generic (x86_64)
Consult /var/lib/dkms/nvidia/418.87.00/build/make.log for more information.
dpkg: error processing package nvidia-dkms-418 (--configure):
installed nvidia-dkms-418 package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of nvidia-driver-418:
nvidia-driver-418 depends on nvidia-dkms-418 (= 418.87.00-0ubuntu1); however:
Package nvidia-dkms-418 is not configured yet.
dpkg: error processing package nvidia-driver-418 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cuda-drivers:
cuda-drivers depends on nvidia-dkms-418 (>= 418.87.00); however:
Package nvidia-dkms-418 is not configured yet.
cuda-drivers depends on nvidia-driver-418 (>= 418.87.00); however:
Package nvidia-driver-418 is not configured yet.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: error processing package cuda-drivers (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cuda-runtime-10-1:
cuda-runtime-10-1 depends on cuda-drivers (>= 418.87); however:
Package cuda-drivers is not configured yet.
dpkg: error processing package cuda-runtime-10-1 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cuda-demo-suite-10-1:
cuda-demo-suite-10-1 depends on cuda-runtime-10-1; however:
Package cuda-runtime-10-1 is not configured yet.
dpkg: error processing package cuda-demo-suite-10-1 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cuda-10-1:
cuda-10-1 depends on cuda-runtime-10-1 (>= 10.1.243); however:
Package cuda-runtime-10-1 is not configured yet.
cuda-10-1 depends on cuda-demo-suite-10-1 (>= 10.1.243); however:
Package cuda-demo-suite-10-1 is not configured yet.
dpkg: error proNo apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
cessing package cuda-10-1 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cuda:
cuda depends on cuda-10-1 (>= 10.1.243); however:
Package cuda-10-1 is not configured yet.
dpkg: error processing package cuda (--configure):
dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.img-5.8.0-59-generic
Errors were encountered while processing:
nvidia-dkms-418
nvidia-driver-418
cuda-drivers
cuda-runtime-10-1
cuda-demo-suite-10-1
cuda-10-1
cuda
E: Sub-process /usr/bin/dpkg returned an error code (1)
EDIT: cuda 10.1 requires nvidia driver greater than 418. So I changed it to nvidia-driver-465
(software & updates --> Additional drivers). However, it keeps reverting back to nvidia-driver-418