0

I am trying to install the recommended (v550) nvidia drivers, but there are other/earlier versions (v535-server) that won't let this happen?!

[In response to AskUbuntu bot claim this is duplicate of: https://askubuntu.com/questions/176121/dpkg-error-trying-to-overwrite-file-which-is-also-in)

Note that the prior query's answer suggests FIRST PURGING the offending (installed) package. I HAVE TRIED THAT, WITH THE ERROR I MENTION.]

Details:

  1. sudo ubuntu-drivers install nvidia:550

complains about unmet dependencies and produces this log

    Reading package lists...
    Building dependency tree...
    Reading state information...
    You might want to run 'apt --fix-broken install' to correct these.
    The following packages have unmet dependencies:
    libcuinj64-12.0 : Depends: libnvidia-compute-535 (>= 525) but it is not going to be installed or
    libnvidia-compute-535-server (>= 525) but it is not going to be installed or
    libnvidia-compute-525 (>= 525) but it is not going to be installed or
    libnvidia-compute-525-server (>= 525) but it is not going to be installed or
    libcuda.so.1 (>= 525) or
    libcuda-12.0-1
    libnvidia-ml-dev : Depends: libnvidia-compute-535 (>= 525) but it is not going to be installed or
    libnvidia-compute-535-server (>= 525) but it is not going to be installed or
    libnvidia-compute-525 (>= 525) but it is not going to be installed or
    libnvidia-compute-525-server (>= 525) but it is not going to be installed or
    libnvidia-ml.so.1 (>= 525)
    linux-modules-nvidia-550-generic : Depends: linux-modules-nvidia-550-6.8.0-47-generic (= 6.8.0-47.47) but it is not going to be installed
    Depends: nvidia-kernel-common-550 (>= 550.107.02) but it is not going to be installed
    nvidia-compute-utils-535-server : Depends: libnvidia-compute-535-server but it is not going to be installed
    nvidia-cuda-dev : Depends: libnvidia-compute-535 (>= 525) but it is not going to be installed or
    libnvidia-compute-535-server (>= 525) but it is not going to be installed or
    libnvidia-compute-525 (>= 525) but it is not going to be installed or
    libnvidia-compute-525-server (>= 525) but it is not going to be installed or
    libcuda.so.1 (>= 525) or
    libcuda-12.0-1
    Recommends: libnvcuvid1 but it is not installable
    nvidia-driver-550 : Depends: libnvidia-gl-550 (= 550.107.02-0ubuntu0.24.04.1) but it is not going to be installed
    Depends: nvidia-kernel-common-550 (<= 550.107.02-1) but it is not going to be installed
    Depends: nvidia-kernel-common-550 (>= 550.107.02) but it is not going to be installed
    Depends: nvidia-kernel-source-550 (= 550.107.02-0ubuntu0.24.04.1) but it is not going to be installed
    Depends: libnvidia-compute-550 (= 550.107.02-0ubuntu0.24.04.1) but it is not going to be installed
    Depends: libnvidia-extra-550 (= 550.107.02-0ubuntu0.24.04.1) but it is not going to be installed
    Depends: nvidia-compute-utils-550 (= 550.107.02-0ubuntu0.24.04.1) but it is not going to be installed
    Depends: libnvidia-decode-550 (= 550.107.02-0ubuntu0.24.04.1) but it is not going to be installed
    Depends: libnvidia-encode-550 (= 550.107.02-0ubuntu0.24.04.1) but it is not going to be installed
    Depends: nvidia-utils-550 (= 550.107.02-0ubuntu0.24.04.1) but it is not going to be installed
    Depends: xserver-xorg-video-nvidia-550 (= 550.107.02-0ubuntu0.24.04.1) but it is not going to be installed
    Depends: libnvidia-cfg1-550 (= 550.107.02-0ubuntu0.24.04.1) but it is not going to be installed
    Depends: libnvidia-fbc1-550 (= 550.107.02-0ubuntu0.24.04.1) but it is not going to be installed
    Recommends: nvidia-prime (>= 0.8) but it is not going to be installed
    Recommends: libnvidia-compute-550:i386 (= 550.107.02-0ubuntu0.24.04.1)
    Recommends: libnvidia-decode-550:i386 (= 550.107.02-0ubuntu0.24.04.1)
    Recommends: libnvidia-encode-550:i386 (= 550.107.02-0ubuntu0.24.04.1)
    Recommends: libnvidia-fbc1-550:i386 (= 550.107.02-0ubuntu0.24.04.1)
    Recommends: libnvidia-gl-550:i386 (= 550.107.02-0ubuntu0.24.04.1)
    nvidia-headless-no-dkms-535-server : Depends: libnvidia-compute-535-server (= 535.183.06-0ubuntu0.24.04.1) but it is not going to be installed

and recommends 'apt --fix-broken install. Trying to do that

  1. sudo apt --fix-broken install

     Reading package lists...
     Building dependency tree...
     Reading state information...
     Correcting dependencies... Done
     The following packages were automatically installed and are no longer required:
     libatomic1:i386 libbsd0:i386 libdrm-amdgpu1:i386 libdrm-intel1:i386
     libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386 libedit2:i386
     libegl-mesa0:i386 libegl1:i386 libelf1t64:i386 libexpat1:i386 libffi8:i386
     libgbm1:i386 libgl1:i386 libgl1-mesa-dri:i386 libglapi-mesa:i386
     libgles2:i386 libglvnd0:i386 libglx-mesa0:i386 libglx0:i386 libicu74:i386
     libllvm17t64:i386 libnvidia-common-535 libnvidia-extra-535
     libnvidia-fbc1-535 libnvidia-fbc1-535:i386 libnvidia-gl-535
     libnvidia-gl-535:i386 libopengl0:i386 libpciaccess0:i386 libsensors5:i386
     libstdc++6:i386 libvulkan1:i386 libwayland-client0:i386
     libwayland-server0: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-shm0:i386 libxcb-sync1:i386 libxcb-xfixes0:i386
     libxcb1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386 libxml2:i386
     libxnvctrl0 libxshmfence1:i386 libxxf86vm1:i386 mailcap nvidia-settings
     plocate screen-resolution-extra
     Use 'sudo apt autoremove' to remove them.
     The following additional packages will be installed:
     libnvidia-compute-535-server
     The following NEW packages will be installed:
     libnvidia-compute-535-server
     0 upgraded, 1 newly installed, 0 to remove and 62 not upgraded.
     6 not fully installed or removed.
     Need to get 0 B/40.3 MB of archives.
     After this operation, 175 MB of additional disk space will be used.
     Do you want to continue? [Y/n] (Reading database ...  ... 100%
     (Reading database ... 270820 files and directories currently installed.)
     Preparing to unpack .../libnvidia-compute-535-server_535.183.06-0ubuntu0.24.04.1_amd64.deb ...
     Unpacking libnvidia-compute-535-server:amd64 (535.183.06-0ubuntu0.24.04.1) ...
     dpkg: error processing archive /var/cache/apt/archives/libnvidia-compute-535-server_535.183.06-0ubuntu0.24.04.1_amd64.deb (--unpack):
     trying to overwrite '/usr/lib/x86_64-linux-gnu/libnvidia-pkcs11-openssl3.so.535.183.06', which is also in package libnvidia-extra-535:amd64 535.183.06-0ubuntu1
     dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
     Errors were encountered while processing:
     /var/cache/apt/archives/libnvidia-compute-535-server_535.183.06-0ubuntu0.24.04.1_amd64.deb
    

Help please! I'm currently trapped in (I guess the default) GUI config using a 640x480 screen spec. Thanks very much.

rikb
  • 101

1 Answers1

0

The key error from your question is

 dpkg: error processing archive /var/cache/apt/archives/libnvidia-compute-535-server_535.183.06-0ubuntu0.24.04.1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libnvidia-pkcs11-openssl3.so.535.183.06', which is also in package libnvidia-extra-535:amd64 535.183.06-0ubuntu1

So libnvidia-compute-535-server_535.183.06-0ubuntu0.24.04.1_amd64.deb conflicts with libnvidia-extra-535:amd64 535.183.06-0ubuntu1

You can force install this with

apt -o Dpkg::Options::="--force-overwrite" install vidia-compute-535-server_535.183.06-0ubuntu0.24.04.1

although this likely will have more dependency and conflict issues.

Or perhaps, simpler,

apt -o Dpkg::Options::="--force-overwrite" --fix-broken install

The correct solution likely would be for the package to internally have a Replaces: line for the conflicting package in its control file, but the package author would have to do that.

If --fix-broken wants to keep the 535 driver rather than the newer driver, there are two things that may help. use apt-mark showmanual | grep 535 along with apt-mark showhold... and see if the older driver is being forced. If there are held versions of the older driver, then trying ubuntu-drivers install nvidia:550 again may help.

Feed a list of all of the 535 packages to apt-mark auto, and then try apt install again with the correct driver.

That failing, it may help to check the apt logs (/var/log/apt/*log) to see what it is trying to install, and try installing manually with apt-install. (Maybe nvidia-driver-550 or something?)

When you run apt-install with that package, it may give more dependency and conflict errors. Rerun the same apt-install line, but add the 550 dependencies to the line, and add the 535 conflicts followed by a - (e.g., nvidia-driver-535- ) and keep adding stuff until it works.

Typically there are one or two older packages that don't want to be removed, and once you hit those the whole chain falls apart and the upgrade proceeds.

It would be nice if ubuntu had better conflict resolution that would do this automatically, perhaps offering alternate sets of conflicting packages as a set rather than just giving huge incomplete lists of conflicts and unresolved depenencies.

user10489
  • 5,533