CUDA Driver Installation Error on AGX Xavier

I followed the instructions on https://developer.nvidia.com/cuda-toolkit/arm for CUDA Toolkit for Ubuntu 18.04 LTS on my AGX Xavier but got the errors:

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

However, running sudo apt --fix-broken install returns the following:

khoongweihao@khoongweihao-desktop:~/Downloads$ 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:
  efibootmgr gir1.2-geocodeglib-1.0 libfwup1 libllvm8
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libnvidia-compute-435 libnvidia-gl-435
The following NEW packages will be installed:
  libnvidia-compute-435 libnvidia-gl-435
0 upgraded, 2 newly installed, 0 to remove and 14 not upgraded.
70 not fully installed or removed.
Need to get 0 B/29.9 MB of archives.
After this operation, 154 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 file:/var/cuda-repo-10-2-local-10.2.107-435.17.01  libnvidia-compute-435 435.17.01-0ubuntu1 [8,141 kB]
Get:2 file:/var/cuda-repo-10-2-local-10.2.107-435.17.01  libnvidia-gl-435 435.17.01-0ubuntu1 [21.8 MB]
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 169621 files and directories currently installed.)
Preparing to unpack .../libnvidia-compute-435_435.17.01-0ubuntu1_arm64.deb ...
Unpacking libnvidia-compute-435:arm64 (435.17.01-0ubuntu1) ...
dpkg: error processing archive /var/cuda-repo-10-2-local-10.2.107-435.17.01/./libnvidia-compute-435_435.17.01-0ubuntu1_arm64.deb (--unpack):
 trying to overwrite '/usr/lib/aarch64-linux-gnu/libcuda.so', which is also in package nvidia-l4t-cuda 32.3.1-20191216133751
Preparing to unpack .../libnvidia-gl-435_435.17.01-0ubuntu1_arm64.deb ...
Unpacking libnvidia-gl-435:arm64 (435.17.01-0ubuntu1) ...
dpkg: error processing archive /var/cuda-repo-10-2-local-10.2.107-435.17.01/./libnvidia-gl-435_435.17.01-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.3.1-20191216133751
Errors were encountered while processing:
 /var/cuda-repo-10-2-local-10.2.107-435.17.01/./libnvidia-compute-435_435.17.01-0ubuntu1_arm64.deb
 /var/cuda-repo-10-2-local-10.2.107-435.17.01/./libnvidia-gl-435_435.17.01-0ubuntu1_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Is there a way to fix this? Some help will be deeply appreciated.

Hi, khoongweihao

Jetson requires jetpack to install all the components, sdks, libs which is different with the arm based cuda server.

Here is the link of the sdkmanager, https://developer.nvidia.com/nvidia-sdk-manager, you can get all your need with this GUI installer.

@alanz Thank you for the clarification. I have tried flashing my Jetson with Jetpack 4.2, but got an error which I am unable to resolve on my end… I have created a topic for this error here: AGX Xavier Jetpack 4.2 Flashing Failed (At Around 98%)

Now we have released the jetpack 4.3, which worth to try. If you still have problems pls feel free to share your logs generated by sdkmanger.

@alanz Thanks for the heads-up. I’ve tried Jetpack 4.2 and 4.3 which yielded similar errors. I’ve since opened a new thread here: AGX Xavier Jetpack 4.2 Flashing Failed (At Around 98%)

Will be closing this issue.