Score:-2

How can I remedy this problem? Please see the terminal log below

pr flag

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

hr flag
This appears to be essentially the same issue as [CUDA install issue: Invalid cross-device link](https://askubuntu.com/questions/1252188/cuda-install-issue-invalid-cross-device-link)
phydev avatar
pr flag
@steeldriver I tried and getting ´dpkg: error: cannot access archive '/var/cache/apt/archives/libnvidia-compute-450_450.36.06-0ubuntu1_amd64.deb': No such file or directory´
phydev avatar
pr flag
Updated the post with the outputs
karel avatar
sa flag
Does this answer your question? [How do I resolve unmet dependencies after adding a PPA?](https://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies-after-adding-a-ppa)
Score:0
eh flag

Try running sudo dpkg --configure -a

You got 3 ways to fix this:

#1 Reconfigure dpkg Database:
sudo dpkg --configure -a
This command reconfigures packages that have been unpacked but not necessarily installed. An interruption at the wrong time can cause this database to become corrupt. This is especially helpful if you were running installation and the process was interrupted.

#2 Force-Install the Software:
sudo apt-get install -f
The -f option means fix-broken. It repairs any broken dependencies in your package manager.

#3 Remove Bad Software Package:
sudo apt-get remove --purge package_name
The --purge option makes the system remove config files in addition to uninstalling them. This helps get rid of all traces of the offending software.

phydev avatar
pr flag
Please check the outputs of these commands. What else can I try?
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.