Dependencie conflict loop with libnvidia-decode-580-server

in the process of trying to compile opencv with cuda support i instigated a dependecie conflicte loop that rendred apt unusable.

error by apt when trying to install any package :

You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
libnvidia-decode-580-server : Depends: libnvidia-compute-580-server (= 580.173.02-0ubuntu0.22.04.1) but it is not installed
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).

fixing this error tries to install libnvidia-compute-580-server and fails with this error :

ebconf: delaying package configuration, since apt-utils is not installed
(Reading database … 204812 files and directories currently installed.)
Preparing to unpack …/libnvidia-compute-580-server_580.173.02-0ubuntu0.22.04.1_arm64.deb …
Unpacking libnvidia-compute-580-server:arm64 (580.173.02-0ubuntu0.22.04.1) …
dpkg: error processing archive /var/cache/apt/archives/libnvidia-compute-580-server_580.173.02-0ubuntu0.22.04.1_arm64.deb (–unpack):
trying to overwrite ‘/usr/lib/aarch64-linux-gnu/libcuda.so’, which is also in package nvidia-l4t-cuda 36.4.7-20250918154033
Errors were encountered while processing:
/var/cache/apt/archives/libnvidia-compute-580-server_580.173.02-0ubuntu0.22.04.1_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

trying to remove any of those package triggers a conflics as they relly on each other and other packages (550 - 570 - 580)

also im afraid it might break my install i cant really reinstall the whole system. as it would take some time to set it up with my python venv for my project . and the project presentation date it due in a couple days.

UPDATE :
after more investigating i found the origine of the problem.
while trying to compile opencv. i had to install opencv-contrib-python from jp6/cu126 index .
now running that in python gives this error :

ImportError: libnvcuvid.so.1: cannot open shared object file: No such file or directory

soo following this https://askubuntu.com/questions/1516940/ubuntu-server-22-04-installing-nvidia-drivers-with-libnvcuvid1-without-also-inst i tryed installing libnvidia-decode-550-server

which leads to the current dependencie hell :)