Help - I messed up I need to get Tensorrt and Jetpack reinstalled Nvidia AGX Orin

I meant to decline an update this morning but clicked the wrong button and a CUDA update started. It would appear that during this process Tensorrt was deleted and not re-installed. The install seems to have failed and now any attempt to try and reinstall nvidia-jetpack or Tensorrt and its libs are met with the message below. I know I could re-flash but I put a 4TB NVME Drive into this AGX Orin because I have some HUGE proprietary LLM’s I have created on here. They are backed up but when I have tried to restore previously they often fail to restore. So I am really worried I will loose the data. Is there any way I can get back to a stable Jetpack 6.2.1 and the correct cuda and tensorrt files reinstalled without re-flashing?

Thanks folks,

Hillary

The following packages have unmet dependencies.
nvidia-container : Depends: nvidia-container-toolkit-base (= 1.16.2-1) but 1.17.8-1 is to be installed
Depends: libnvidia-container-tools (= 1.16.2-1) but 1.17.8-1 is to be installed
Depends: nvidia-container-toolkit (= 1.16.2-1) but 1.17.8-1 is to be installed
Depends: libnvidia-container1 (= 1.16.2-1) but 1.17.8-1 is to be installed
nvidia-cuda : Depends: cuda-cudart-dev-12-6 (= 12.6.68-1) but 12.6.77-1 is to be installed
Depends: cuda-driver-dev-12-6 (= 12.6.68-1) but 12.6.77-1 is to be installed
nvidia-cudnn : Depends: libcudnn9-cuda-12 (= 9.3.0.75-1) but 9.12.0.46-1 is to be installed
nvidia-cudnn-dev : Depends: libcudnn9-samples (= 9.3.0.75-1) but 9.12.0.46-1 is to be installed
Depends: libcudnn9-dev-cuda-12 (= 9.3.0.75-1) but 9.12.0.46-1 is to be installed
nvidia-tensorrt : Depends: tensorrt-libs (= 10.3.0.30-1+cuda12.5) but 10.7.0.23-1+cuda12.6 is to be installed
nvidia-tensorrt-dev : Depends: tensorrt (= 10.3.0.30-1+cuda12.5) but 10.7.0.23-1+cuda12.6 is to be installed
E: Unable to correct problems, you have held broken packages.

Edit: I have docker on a mounted usb drive so images weren’t affected. To be safe:

sudo mv /var/lib/docker/ /var/lib/docker_backup

Then after reinstalling docker

sudo mv /var/lib/docker/ /var/lib/docker_temp

sudo mv /var/lib/docker_backup/ /var/lib/docker


This is not guaranteed to work, but I encountered a similar problem that ultimately was resolved with something akin to below.
If used please check logic to make sure it is in line with the scope of the problem.

First try this:

sudo apt-get update && sudo apt --fix-broken install

Following is partially from Ubuntu | Docker Docs

for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get -y remove $pkg; done

#Same for nvidia packages in your post
for pkg in cuda-toolkit nvidia-container-toolkit libnvidia-container-tools cuda-driver-dev-12-6 nvidia-cudnn nvidia-cudnn-dev tensorrt nvidia-tensorrt nvidia-tensorrt-dev; do sudo apt-get -y remove $pkg; done

sudo apt --fix-broken install

#Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

#Add the repository to Apt sources:containerd.io
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update


sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

sudo apt-get install cuda-toolkit nvidia-container-toolkit libnvidia-container-tools cuda-driver-dev-12-6 nvidia-cudnn nvidia-cudnn-dev tensorrt nvidia-tensorrt nvidia-tensorrt-dev libcudnn9-cuda-12

Hi,

Could you try to run sudo apt-get install -f and share the output log with us?
In general, you can manually uninstall the “not installable” packages and re-run the following command to install the JetPack 6.2.1 stack back.

$ sudo apt-get install nvidia-jetpack

Thanks.

Hi and thanks for the reply, Yeah unfortunately I am not using docker. I find it sometimes adds a layer of complexity particularly with networking and disk access etc. In the light of this um accident I am reviewing that decision…. but your post does give me some clues thank you.

Output of “sudo apt-get install -f” is “0 to upgrade, 0 to newly install, 0 to remove and 7 not to upgrade.” or did you mean a log file? when I try and do “sudo apt-get install nvidia-jetpack” thats when I got the messages above. I actually only need to re-install TensorRT. By the way Docker is one of the held packages because an earlier update broke Docker but I was able to recover that situation from a helpful post on the forum and held docker from further updates to stop the issue happening again.

Hi Folks I FIXED IT :) In case its helps someone else with Broken packages this is how I fixed it:

first install aptitude: sudo apt install aptitude.

Then attempt to reinstall the package: sudo aptitude install nvidia-tensorrt.

It will tell you packages need to be downgraded or removed hit “y” to accept the solution (after reading the message carefully and making sure its going to work)

A whole lot of packages get removed and overwritten with compatible versions…

You might get additional messages about incompatible versions again read the messages carefully and type “y” to accept the solution if it’s appropriate.

then sudo apt install nvidia-tensorrt. Why this last step is necessary I am not sure but it worked for me. Thanks for the help and advice everyone you prompted me in the right direction.

Hillary PS I REALLY want to run Nvidia Cosmos Reason on my AGX Orin ;)

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.