CUDA toolkit 11.0 broken installation

Hello,

I just tried to upgrade to the latest CUDa toolkit 11.0 as instructed here → https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=sbsa&compilation=compilation_native&target_distro=Ubuntu&target_version=1804&target_type=deblocal

Installation was partial with the following errors:

sudo apt-get -y install cuda

Reading package lists... Done
Building dependency tree       
Reading state information... Done
cuda is already the newest version (11.0.3-1).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 cuda-drivers-450 : Depends: libnvidia-compute-450 (>= 450.51.06) but it is not going to be installed
                    Depends: libnvidia-gl-450 (>= 450.51.06) but it is not going to be installed
 libnvidia-decode-450 : Depends: libnvidia-compute-450 (= 450.51.06-0ubuntu1) but it is not going to be installed
 libnvidia-ifr1-450 : Depends: libnvidia-gl-450 but it is not going to be installed
 nvidia-compute-utils-450 : Depends: libnvidia-compute-450 but it is not going to be installed
 nvidia-driver-450 : Depends: libnvidia-gl-450 (= 450.51.06-0ubuntu1) but it is not going to be installed
                     Depends: libnvidia-compute-450 (= 450.51.06-0ubuntu1) but it is not going to be installed
 nvidia-utils-450 : Depends: libnvidia-compute-450 but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

and then

damian@jetson-nano:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  apt-clone archdetect-deb bogl-bterm busybox-static cryptsetup-bin dpkg-repack gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common kde-window-manager kinit kio kpackagetool5 kwayland-data kwin-common
  kwin-data kwin-x11 libdebian-installer4 libkdecorations2-5v5 libkdecorations2private5v5 libkf5activities5 libkf5attica5 libkf5completion-data libkf5completion5 libkf5declarative-data libkf5declarative5
  libkf5doctools5 libkf5globalaccel-data libkf5globalaccel5 libkf5globalaccelprivate5 libkf5idletime5 libkf5jobwidgets-data libkf5jobwidgets5 libkf5kcmutils-data libkf5kcmutils5 libkf5kiocore5
  libkf5kiontlm5 libkf5kiowidgets5 libkf5newstuff-data libkf5newstuff5 libkf5newstuffcore5 libkf5package-data libkf5package5 libkf5plasma5 libkf5quickaddons5 libkf5solid5 libkf5solid5-data
  libkf5sonnet5-data libkf5sonnetcore5 libkf5sonnetui5 libkf5textwidgets-data libkf5textwidgets5 libkf5waylandclient5 libkf5waylandserver5 libkf5xmlgui-bin libkf5xmlgui-data libkf5xmlgui5
  libkscreenlocker5 libkwin4-effect-builtins1 libkwineffects11 libkwinglutils11 libkwinxrenderutils11 libqgsttools-p1 libqt5designer5 libqt5help5 libqt5multimedia5 libqt5multimedia5-plugins
  libqt5multimediaquick-p5 libqt5multimediawidgets5 libqt5opengl5 libqt5positioning5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5quickwidgets5 libqt5sensors5 libqt5sql5 libqt5test5
  libqt5webchannel5 libqt5webkit5 libxcb-composite0 libxcb-cursor0 libxcb-damage0 os-prober python3-dbus.mainloop.pyqt5 python3-icu python3-pam python3-pyqt5 python3-pyqt5.qtsvg python3-pyqt5.qtwebkit
  python3-sip qml-module-org-kde-kquickcontrolsaddons qml-module-qtmultimedia qml-module-qtquick2 rdate tasksel tasksel-data
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libnvidia-compute-450 libnvidia-gl-450
The following NEW packages will be installed:
  libnvidia-compute-450 libnvidia-gl-450
0 upgraded, 2 newly installed, 0 to remove and 21 not upgraded.
71 not fully installed or removed.
Need to get 0 B/64,3 MB of archives.
After this operation, 258 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 file:/var/cuda-repo-ubuntu1804-11-0-local  libnvidia-compute-450 450.51.06-0ubuntu1 [9 235 kB]
Get:2 file:/var/cuda-repo-ubuntu1804-11-0-local  libnvidia-gl-450 450.51.06-0ubuntu1 [55,0 MB]
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 186618 files and directories currently installed.)
Preparing to unpack .../libnvidia-compute-450_450.51.06-0ubuntu1_arm64.deb ...
Unpacking libnvidia-compute-450:arm64 (450.51.06-0ubuntu1) ...
dpkg: error processing archive /var/cuda-repo-ubuntu1804-11-0-local/./libnvidia-compute-450_450.51.06-0ubuntu1_arm64.deb (--unpack):
 trying to overwrite '/usr/lib/aarch64-linux-gnu/libcuda.so', which is also in package nvidia-l4t-cuda 32.4.3-20200625213809
Preparing to unpack .../libnvidia-gl-450_450.51.06-0ubuntu1_arm64.deb ...
Unpacking libnvidia-gl-450:arm64 (450.51.06-0ubuntu1) ...
dpkg: error processing archive /var/cuda-repo-ubuntu1804-11-0-local/./libnvidia-gl-450_450.51.06-0ubuntu1_arm64.deb (--unpack):
 trying to overwrite '/usr/share/glvnd/egl_vendor.d/10_nvidia.json', which is also in package nvidia-l4t-3d-core 32.4.3-20200625213809
Errors were encountered while processing:
 /var/cuda-repo-ubuntu1804-11-0-local/./libnvidia-compute-450_450.51.06-0ubuntu1_arm64.deb
 /var/cuda-repo-ubuntu1804-11-0-local/./libnvidia-gl-450_450.51.06-0ubuntu1_arm64.deb

Now I have a broken package management (apt-get install whatever) throws this error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 cuda-drivers-450 : Depends: libnvidia-compute-450 (>= 450.51.06) but it is not going to be installed
                    Depends: libnvidia-gl-450 (>= 450.51.06) but it is not going to be installed
 libnvidia-decode-450 : Depends: libnvidia-compute-450 (= 450.51.06-0ubuntu1) but it is not going to be installed
 libnvidia-ifr1-450 : Depends: libnvidia-gl-450 but it is not going to be installed
 nvidia-compute-utils-450 : Depends: libnvidia-compute-450 but it is not going to be installed
 nvidia-driver-450 : Depends: libnvidia-gl-450 (= 450.51.06-0ubuntu1) but it is not going to be installed
                     Depends: libnvidia-compute-450 (= 450.51.06-0ubuntu1) but it is not going to be installed
 nvidia-utils-450 : Depends: libnvidia-compute-450 but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Please provide informatin on how to fix my system

Those look like desktop PC architecture, and not the Jetson’s arm64 architecture. These should have refused to install to a Jetson. The version of CUDA which works with a given L4T/JetPack/SDKM release is tightly coupled to the operating system itself, and you should install only the version intended for that release. If you downloaded and forced one of those to install I’m going to recommend you flash and start over if you cannot remove those packages.

I’m not positive, but I do not think CUDA version 11 is available yet for Jetsons.

That is correct, CUDA 10.2 is the version shipping in the latest JetPack 4.4 production release.

It looks like @DamianD may have installed the SBSA packages (arm64 server). These are for arm64 servers using discrete GPUs, not Jetson. I would suggest re-flashing the system, or uninstalling the broken packages and re-installing nvidia-jetpack.