I am trying to do apt autoremove
, apt --fix-broken install
, apt upgrade
or apt install -f
and running into these kind of errors. It looks like a vicious cycle I cannot come out of. Please help a complete linux n00b.
Output of sudo apt-get update
Get:1 file:/var/cuda-repo-ubuntu2204-11-7-local InRelease [1,575 B]
Get:1 file:/var/cuda-repo-ubuntu2204-11-7-local InRelease [1,575 B]
Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Hit:3 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Fetched 110 kB in 1s (202 kB/s)
Reading package lists... Done
Output of sudo apt-get upgrade
:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
cuda-drivers-515 : Depends: nvidia-compute-utils-515 (>= 515.43.04) but it is not installed
Depends: nvidia-utils-515 (>= 515.43.04) but it is not installed
nvidia-driver-515 : Depends: nvidia-compute-utils-515 (= 515.43.04-0ubuntu1) but it is not installed
Depends: nvidia-utils-515 (= 515.43.04-0ubuntu1) but it is not installed
Recommends: libnvidia-compute-515:i386 (= 515.43.04-0ubuntu1)
Recommends: libnvidia-decode-515:i386 (= 515.43.04-0ubuntu1)
Recommends: libnvidia-encode-515:i386 (= 515.43.04-0ubuntu1)
Recommends: libnvidia-fbc1-515:i386 (= 515.43.04-0ubuntu1)
Recommends: libnvidia-gl-515:i386 (= 515.43.04-0ubuntu1)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Output of apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
javascript-common libaccinj64-11.5 libbabeltrace1 libboost-regex1.74.0 libcub-dev libcublas11 libcublaslt11 libcudart11.0 libcufft10 libcufftw10 libcupti-dev libcupti-doc libcupti11.5 libcurand10
libcusolver11 libcusolvermg11 libcusparse11 libdebuginfod-common libdebuginfod1 libdouble-conversion3 libdw1 libegl-dev libgl-dev libgl1-mesa-dev libgles-dev libgles1 libglvnd-core-dev libglvnd-dev
libglx-dev libipt2 libjs-jquery libjs-sphinxdoc libjs-underscore libnppc11 libnppial11 libnppicc11 libnppidei11 libnppif11 libnppig11 libnppim11 libnppist11 libnppisu11 libnppitc11 libnpps11 libnvblas11
libnvjpeg11 libnvrtc-builtins11.5 libnvrtc11.2 libnvtoolsext1 libnvvm4 libopengl-dev libpcre2-16-0 libpthread-stubs0-dev libpython3.10 libqt5core5a libqt5dbus5 libqt5network5 libsource-highlight-common
libsource-highlight4v5 libtbb-dev libtbb12 libtbbmalloc2 libthrust-dev libvdpau-dev libx11-dev libxau-dev libxcb-xkb1 libxcb1-dev libxdmcp-dev libxkbcommon-x11-0 node-html5shiv nsight-compute
nsight-compute-target nvidia-cuda-gdb nvidia-cuda-toolkit-doc nvidia-opencl-dev ocl-icd-opencl-dev opencl-c-headers opencl-clhpp-headers openjdk-8-jre qttranslations5-l10n x11proto-dev xorg-sgml-doctools
xtrans-dev
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
nvidia-compute-utils-515 nvidia-utils-515
The following NEW packages will be installed:
nvidia-compute-utils-515 nvidia-utils-515
0 upgraded, 2 newly installed, 0 to remove and 6 not upgraded.
7 not fully installed or removed.
Need to get 0 B/608 kB of archives.
After this operation, 1,966 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 file:/var/cuda-repo-ubuntu2204-11-7-local nvidia-compute-utils-515 515.43.04-0ubuntu1 [271 kB]
Get:2 file:/var/cuda-repo-ubuntu2204-11-7-local nvidia-utils-515 515.43.04-0ubuntu1 [337 kB]
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 105126 files and directories currently installed.)
Preparing to unpack .../nvidia-compute-utils-515_515.43.04-0ubuntu1_amd64.deb ...
Unpacking nvidia-compute-utils-515 (515.43.04-0ubuntu1) ...
dpkg: error processing archive /var/cuda-repo-ubuntu2204-11-7-local/./nvidia-compute-utils-515_515.43.04-0ubuntu1_amd64.deb (--unpack):
unable to make backup link of './usr/bin/nvidia-cuda-mps-control' before installing new version: Invalid cross-device link
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../nvidia-utils-515_515.43.04-0ubuntu1_amd64.deb ...
Unpacking nvidia-utils-515 (515.43.04-0ubuntu1) ...
dpkg: error processing archive /var/cuda-repo-ubuntu2204-11-7-local/./nvidia-utils-515_515.43.04-0ubuntu1_amd64.deb (--unpack):
unable to make backup link of './usr/bin/nvidia-debugdump' before installing new version: Invalid cross-device link
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cuda-repo-ubuntu2204-11-7-local/./nvidia-compute-utils-515_515.43.04-0ubuntu1_amd64.deb
/var/cuda-repo-ubuntu2204-11-7-local/./nvidia-utils-515_515.43.04-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Output of sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of cuda-drivers-515:
cuda-drivers-515 depends on nvidia-compute-utils-515 (>= 515.43.04); however:
Package nvidia-compute-utils-515 is not installed.
cuda-drivers-515 depends on nvidia-utils-515 (>= 515.43.04); however:
Package nvidia-utils-515 is not installed.
dpkg: error processing package cuda-drivers-515 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cuda-drivers:
cuda-drivers depends on cuda-drivers-515 (= 515.43.04-1); however:
Package cuda-drivers-515 is not configured yet.
dpkg: error processing package cuda-drivers (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-driver-515:
nvidia-driver-515 depends on nvidia-compute-utils-515 (= 515.43.04-0ubuntu1); however:
Package nvidia-compute-utils-515 is not installed.
nvidia-driver-515 depends on nvidia-utils-515 (= 515.43.04-0ubuntu1); however:
Package nvidia-utils-515 is not installed.
dpkg: error processing package nvidia-driver-515 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cuda-runtime-11-7:
cuda-runtime-11-7 depends on cuda-drivers (>= 515.43.04); however:
Package cuda-drivers is not configured yet.
dpkg: error processing package cuda-runtime-11-7 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cuda-demo-suite-11-7:
cuda-demo-suite-11-7 depends on cuda-runtime-11-7; however:
Package cuda-runtime-11-7 is not configured yet.
dpkg: error processing package cuda-demo-suite-11-7 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cuda-11-7:
cuda-11-7 depends on cuda-runtime-11-7 (>= 11.7.0); however:
Package cuda-runtime-11-7 is not configured yet.
cuda-11-7 depends on cuda-demo-suite-11-7 (>= 11.7.50); however:
Package cuda-demo-suite-11-7 is not configured yet.
dpkg: error processing package cuda-11-7 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cuda:
cuda depends on cuda-11-7 (>= 11.7.0); however:
Package cuda-11-7 is not configured yet.
dpkg: error processing package cuda (--configure):
dependency problems - leaving unconfigured
Processing triggers for dbus (1.12.20-2ubuntu4.1) ...
Errors were encountered while processing:
cuda-drivers-515
cuda-drivers
nvidia-driver-515
cuda-runtime-11-7
cuda-demo-suite-11-7
cuda-11-7
cuda
When I try sudo apt-get remove --purge nvidia-cuda-toolkit
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Terminal log