While trying to install CUDA I somehow managed to break my NVIDIA drivers - or maybe it was the dist-upgrade, I don't know.
I have now purged and removed anything NVIDIA-related
sudo apt-get remove --purge '^nvidia-.*'
sudo apt-get autoremove
But as I try to install the NVIDIA-driver I am getting
Error while aplying changes
pk-client-error-quark: Error while installing package: installed nvidia-dkms-418 package post-installation script subprocess returned error exit status 10 (313)
This is the output after removing everything and following the CUDA instructions. Installing cuda via apt-get
wants to install the required NVIDIA driver but fails to do so:
$ sudo apt-get -y install cuda
Reading package lists... Done
Building dependency tree
Reading state information... Done
cuda is already the newest version (10.1.243-1).
0 upgraded, 0 newly installed, 0 to remove and 1 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.4.0-21-generic
Building for architecture x86_64
Building initial module for 5.4.0-21-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.4.0-21-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.
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
dpkgNo 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.
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
No apport report written because MaxReports is reached already
: 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 processing 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.136ubuntu2) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-21-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)
I found a bug report that looks similar to this but regards a different driver version.
Further looking at /var/lib/dkms/nvidia/418.87.00/build/make.log
:
$ cat /var/lib/dkms/nvidia/418.87.00/build/make.log
DKMS make.log for nvidia-418.87.00 for kernel 5.4.0-21-generic (x86_64)
Sat 04 Apr 2020 11:54:26 AM CEST
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-21-generic'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
make -f ./scripts/Makefile.build obj=/var/lib/dkms/nvidia/418.87.00/build \
single-build= \
need-builtin=1 need-modorder=1
ln -sf /var/lib/dkms/nvidia/418.87.00/build/nvidia/nv-kernel.o_binary /var/lib/dkms/nvidia/418.87.00/build/nvidia/nv-kernel.o
ln -sf /var/lib/dkms/nvidia/418.87.00/build/nvidia-modeset/nv-modeset-kernel.o_binary /var/lib/dkms/nvidia/418.87.00/build/nvidia-modeset/nv-modeset-kernel.o
The Module.symvers file is missing, or does not contain any
symbols exported from the kernel. This could cause the NVIDIA
kernel modules to be built against a configuration that does
not accurately reflect the actual target kernel.
The Module.symvers file check can be disabled by setting the
environment variable IGNORE_MISSING_MODULE_SYMVERS to 1.
make[2]: *** [/var/lib/dkms/nvidia/418.87.00/build/Kbuild:182: module_symvers_sanity_check] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1719: /var/lib/dkms/nvidia/418.87.00/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-21-generic'
make: *** [Makefile:81: modules] Error 2
How can I fix this?
Update
It works with the latest driver (nvidia-driver-440
). However, I need nvidia-driver-418
in order to run CUDA on my machine.
0 Answers