AGX Xavier Installation Problem after flash

Hi everyone,

I have flashed AGX Xavier using SDK Manager. After flashing part the process of installation of Jetson SDK Components occurs errors.
How to solve the problem?

My error message like below:

Failed to install debian package for apt issues, requires manual fix [host]. SDK Manager received errors while using apt commands on your system. Please check that the Ubuntu local apt repository is working well on your local system including dependencies of packages. Review SDK Manager terminal for the specific error/s.

And the some part of logs:
15:21:29 INFO: CUDA Toolkit for L4T: 36% [20 cuda-curand-10-2 0 B/38.9 MB 0%] 39% [Working] 39% [Working] 59.8 MB/s 10s Get:21 file:/var/cuda-repo-10-2-local-10.2.89 cuda-curand-dev-10-2 10.2.89-1 [39.1 MB]

15:21:29 INFO: CUDA Toolkit for L4T: 39% [21 cuda-curand-dev-10-2 0 B/39.1 MB 0%] 59.8 MB/s 10s 43% [Working] 59.8 MB/s 10s 43% [Working] 59.8 MB/s 10s Get:22 file:/var/cuda-repo-10-2-local-10.2.89 cuda-cusolver-10-2 10.2.89-1 [52.3 MB]

15:21:30 INFO: CUDA Toolkit for L4T: 43% [22 cuda-cusolver-10-2 0 B/52.3 MB 0%] 59.8 MB/s 10s 47% [Working] 59.8 MB/s 9s Get:23 file:/var/cuda-repo-10-2-local-10.2.89 cuda-cusolver-dev-10-2 10.2.89-1 [15.6 MB]

15:21:31 INFO: CUDA Toolkit for L4T: 47% [23 cuda-cusolver-dev-10-2 0 B/15.6 MB 0%] 59.8 MB/s 9s 49% [Working] 59.8 MB/s 8s 49% [Working] 59.8 MB/s 8s Get:24 file:/var/cuda-repo-10-2-local-10.2.89 cuda-cusparse-10-2 10.2.89-1 [60.1 MB]

15:21:31 INFO: CUDA Toolkit for L4T: 49% [24 cuda-cusparse-10-2 0 B/60.1 MB 0%] 59.8 MB/s 8s 54% [Working] 59.8 MB/s 7s 54% [Working] 59.8 MB/s 7s Get:25 file:/var/cuda-repo-10-2-local-10.2.89 cuda-cusparse-dev-10-2 10.2.89-1 [60.4 MB]

15:21:32 INFO: CUDA Toolkit for L4T: 54% [25 cuda-cusparse-dev-10-2 0 B/60.4 MB 0%] 59.8 MB/s 7s 59% [Working] 59.8 MB/s 6s Get:26 file:/var/cuda-repo-10-2-local-10.2.89 cuda-nvrtc-10-2 10.2.89-1 [5,824 kB]

15:21:32 INFO: CUDA Toolkit for L4T: 59% [26 cuda-nvrtc-10-2 0 B/5,824 kB 0%] 59.8 MB/s 6s 60% [Working] 59.8 MB/s 6s Get:27 file:/var/cuda-repo-10-2-local-10.2.89 cuda-nvrtc-dev-10-2 10.2.89-1 [8,772 B]

15:21:32 INFO: CUDA Toolkit for L4T: 60% [27 cuda-nvrtc-dev-10-2 0 B/8,772 B 0%] 59.8 MB/s 6s 61% [Working] 59.8 MB/s 6s 61% [Connecting to ports.ubuntu.com] 59.8 MB/s 6s Get:28 file:/var/cuda-repo-10-2-local-10.2.89 libcublas10 10.2.2.89-1 [45.8 MB]

15:21:33 INFO: CUDA Toolkit for L4T: 61% [28 libcublas10 0 B/45.8 MB 0%] [Connecting to ports.ubuntu.com] 65% [Connecting to ports.ubuntu.com] 59.8 MB/s 6s 65% [Connecting to ports.ubuntu.com] 59.8 MB/s 6s Get:29 file:/var/cuda-repo-10-2-local-10.2.89 libcublas-dev 10.2.2.89-1 [45.9 MB]

15:21:34 INFO: CUDA Toolkit for L4T: 65% [29 libcublas-dev 0 B/45.9 MB 0%] [Connecting to ports.ubuntu.com] 69% [Connecting to ports.ubuntu.com] 59.8 MB/s 5s 69% [Connecting to ports.ubuntu.com] 59.8 MB/s 5s Get:30 file:/var/cuda-repo-10-2-local-10.2.89 cuda-npp-10-2 10.2.89-1 [60.4 MB]

15:21:35 INFO: CUDA Toolkit for L4T: 69% [30 cuda-npp-10-2 0 B/60.4 MB 0%] [Connecting to ports.ubuntu.com] 74% [Connecting to ports.ubuntu.com] 59.8 MB/s 4s 74% [Connecting to ports.ubuntu.com] 59.8 MB/s 4s Get:31 file:/var/cuda-repo-10-2-local-10.2.89 cuda-npp-dev-10-2 10.2.89-1 [60.6 MB]

15:21:36 INFO: CUDA Toolkit for L4T: 74% [31 cuda-npp-dev-10-2 0 B/60.6 MB 0%] [Connecting to ports.ubuntu.com] 79% [Connecting to ports.ubuntu.com] 60.9 MB/s 3s 79% [Connecting to ports.ubuntu.com] 60.9 MB/s 3s Get:32 file:/var/cuda-repo-10-2-local-10.2.89 cuda-nvgraph-10-2 10.2.89-1 [45.0 MB]

15:21:36 INFO: CUDA Toolkit for L4T: 79% [32 cuda-nvgraph-10-2 0 B/45.0 MB 0%] [Connecting to ports.ubuntu.com] 83% [Connecting to ports.ubuntu.com] 60.9 MB/s 2s Get:33 file:/var/cuda-repo-10-2-local-10.2.89 cuda-nvgraph-dev-10-2 10.2.89-1 [31.0 MB]

15:21:37 INFO: CUDA Toolkit for L4T: 83% [33 cuda-nvgraph-dev-10-2 0 B/31.0 MB 0%] [Connecting to ports.ubuntu.com] 86% [Connecting to ports.ubuntu.com] 60.9 MB/s 1s 86% [Connecting to ports.ubuntu.com] 60.9 MB/s 1s Get:34 file:/var/cuda-repo-10-2-local-10.2.89 cuda-samples-10-2 10.2.89-1 [62.8 MB]

15:21:38 INFO: CUDA Toolkit for L4T: 86% [34 cuda-samples-10-2 0 B/62.8 MB 0%] [Connecting to ports.ubuntu.com] 91% [Connecting to ports.ubuntu.com] 60.9 MB/s 0s 91% [Connecting to ports.ubuntu.com] 60.9 MB/s 0s Get:35 file:/var/cuda-repo-10-2-local-10.2.89 cuda-documentation-10-2 10.2.89-1 [54.1 MB]

15:21:38 INFO: CUDA Toolkit for L4T: 91% [35 cuda-documentation-10-2 0 B/54.1 MB 0%] [Connecting to ports.ubuntu.com 96% [Connecting to ports.ubuntu.com] 60.9 MB/s 0s Get:36 file:/var/cuda-repo-10-2-local-10.2.89 cuda-libraries-10-2 10.2.89-1 [2,588 B]

15:21:38 INFO: CUDA Toolkit for L4T: 96% [36 cuda-libraries-10-2 0 B/2,588 B 0%] [Connecting to ports.ubuntu.com] 96% [Connecting to ports.ubuntu.com] 60.9 MB/s 0s Get:37 file:/var/cuda-repo-10-2-local-10.2.89 cuda-libraries-dev-10-2 10.2.89-1 [2,614 B]

15:21:38 INFO: CUDA Toolkit for L4T: 96% [37 cuda-libraries-dev-10-2 0 B/2,614 B 0%] [Connecting to ports.ubuntu.com 97% [Connecting to ports.ubuntu.com] 60.9 MB/s 0s Get:38 file:/var/cuda-repo-10-2-local-10.2.89 cuda-nvml-dev-10-2 10.2.89-1 [53.4 kB]

15:21:38 INFO: CUDA Toolkit for L4T: 97% [38 cuda-nvml-dev-10-2 0 B/53.4 kB 0%] [Connecting to ports.ubuntu.com] 97% [Connecting to ports.ubuntu.com] 60.9 MB/s 0s Get:39 file:/var/cuda-repo-10-2-local-10.2.89 cuda-tools-10-2 10.2.89-1 [2,498 B]

15:21:38 INFO: CUDA Toolkit for L4T: 97% [39 cuda-tools-10-2 0 B/2,498 B 0%] [Connecting to ports.ubuntu.com] 98% [Connecting to ports.ubuntu.com] 60.9 MB/s 0s Get:40 file:/var/cuda-repo-10-2-local-10.2.89 cuda-toolkit-10-2 10.2.89-1 [2,840 B]

15:21:52 INFO: CUDA Toolkit for L4T: 98% [40 cuda-toolkit-10-2 0 B/2,840 B 0%] [Connecting to ports.ubuntu.com] 98% [Connecting to ports.ubuntu.com] 60.9 MB/s 0s 98% [Connecting to ports.ubuntu.com] 60.9 MB/s 0s 98% [Connecting to ports.ubuntu.com] 60.9 MB/s 0s 98% [Connecting to ports.ubuntu.com] 60.9 MB/s 0s 98% [Connecting to ports.ubuntu.com] 60.9 MB/s 0s 98% [Connecting to ports.ubuntu.com] 60.9 MB/s 0s 98% [Connecting to ports.ubuntu.com] 60.9 MB/s 0s 98% [Connecting to ports.ubuntu.com] 39.2 MB/s 0s 98% [Connecting to ports.ubuntu.com] 39.2 MB/s 0s 98% [Connecting to ports.ubuntu.com] 39.2 MB/s 0s 98% [Connecting to ports.ubuntu.com] 39.2 MB/s 0s 98% [Connecting to ports.ubuntu.com] 39.2 MB/s 0s 98% [Connecting to ports.ubuntu.com] 39.2 MB/s 0s 98% [Connecting to ports.ubuntu.com] 39.2 MB/s 0s 98% [Connecting to ports.ubuntu.com] 39.2 MB/s 0s 98% [Connecting to ports.ubuntu.com] 39.2 MB/s 0s 98% [Connecting to ports.ubuntu.com] 39.2 MB/s 0s 98% [Connecting to ports.ubuntu.com] 39.2 MB/s 0s 98% [Connecting to ports.ubuntu.com] 39.2 MB/s 0s 98% [Connecting to ports.ubuntu.com] 98% [Connecting to ports.ubuntu.com] 98% [Connecting to ports.ubuntu.com] 98% [Connecting to ports.ubuntu.com] 98% [Connecting to ports.ubuntu.com] 98% [Connecting to ports.ubuntu.com] 98% [Connecting to ports.ubuntu.com] 98% [Connecting to ports.ubuntu.com] 98% [Connecting to ports.ubuntu.com] 98% [Connecting to ports.ubuntu.com] Err:41 Index of /ubuntu-ports bionic/main arm64 libxmu-headers all 2:1.1.2-2

15:21:52 INFO: CUDA Toolkit for L4T: Could not resolve ‘ports.ubuntu.com

15:22:02 INFO: CUDA Toolkit for L4T: 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] Err:42 Index of /ubuntu-ports bionic/main arm64 libxmu-dev arm64 2:1.1.2-2

15:22:02 INFO: CUDA Toolkit for L4T: Could not resolve ‘ports.ubuntu.com

15:22:12 INFO: CUDA Toolkit for L4T: 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] Err:43 Index of /ubuntu-ports bionic/main arm64 x11proto-input-dev all 2018.4-4

15:22:12 INFO: CUDA Toolkit for L4T: Could not resolve ‘ports.ubuntu.com

15:22:22 INFO: CUDA Toolkit for L4T: 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] 98% [Working] Err:44 Index of /ubuntu-ports bionic/main arm64 libxi-dev arm64 2:1.7.9-1

15:22:22 INFO: CUDA Toolkit for L4T: Could not resolve ‘ports.ubuntu.com

15:22:22 INFO: CUDA Toolkit for L4T: 98% [Working] SDKM_INSTALL_ERROR E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libx/libxmu/libxmu-headers_1.1.2-2_all.deb Could not resolve ‘ports.ubuntu.com

15:22:22 ERROR: CUDA Toolkit for L4T: E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libx/libxmu/libxmu-dev_1.1.2-2_arm64.deb Could not resolve ‘ports.ubuntu.com

15:22:22 ERROR: CUDA Toolkit for L4T: E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/x/xorgproto/x11proto-input-dev_2018.4-4_all.deb Could not resolve ‘ports.ubuntu.com

15:22:22 ERROR: CUDA Toolkit for L4T: E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libx/libxi/libxi-dev_1.7.9-1_arm64.deb Could not resolve ‘ports.ubuntu.com

15:22:22 ERROR: CUDA Toolkit for L4T: E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

15:22:22 ERROR: CUDA Toolkit for L4T: Unhandled error when running sudo apt-get -y install cuda-toolkit-10-2

15:22:22 INFO: CUDA Toolkit for L4T: [ Package Install Finished with Error ]

15:22:22 INFO: CUDA Toolkit for L4T: [ NV_L4T_CUDA_TARGET_POST_INSTALL_COMP Install took 2m37s ]

15:22:22 ERROR: CUDA Toolkit for L4T: [error]: dpkg install on target failed; [exec_command]: safe_apt_install “sudo dpkg -i /opt/nvidia/deb_repos/cuda-repo-l4t-10-2-local-10.2.89_1.0-1_arm64.deb” 5; sleep 5; ; safe_apt_install "sudo apt-get -y install cuda-toolkit-10-2 " 5; safe_apt_install “sudo apt-get purge -y cuda-repo-l4t-10-2-local-10.2.89” 5; [deb_path]: /home/yumbul/Downloads/nvidia/sdkm_downloads/cuda-repo-l4t-10-2-local-10.2.89_1.0-1_arm64.deb

15:22:22 ERROR: CUDA Toolkit for L4T: command terminated with error

15:22:22 SUMMARY: CUDA Toolkit for L4T: Failed to install debian package for apt issues, requires manual fix [host]. SDK Manager received errors while using apt commands on your system. Please check that the Ubuntu local apt repository is working well on your local system including dependencies of packages. Review SDK Manager terminal for the specific error/s.

Hi goksungur,

Can you please package and attach ~/.nvsdkm directory for more investigation?

Hi Edward,

The main error is like below. I tried two different host computer. The situation is same.

But in both host pcs different version of CUDA was installed.
Does this situation cause the error?

Also, the Xavier AGX is flashed successfully. But in Jetson SDK Componenets softwares installation process, the problem occurs.
My internet connection is Wi-Fi. There is no ethernet connection between host and computer. In User-guide there is no need ethernet connection to flash and first installation. Is it required?

SUMMARY: CUDA Toolkit for L4T: Failed to install debian package for apt issues, requires manual fix [host]. SDK Manager received errors while using apt commands on your system. Please check that the Ubuntu local apt repository is working well on your local system including dependencies of packages. Review SDK Manager terminal for the specific error/s.

If there is no conflict or apt error then it doesn’t cause any error.

Not required. Wi-Fi is okay.

I need the detailed logs as mentioned in comment AGX Xavier Installation Problem after flash - #3 by EdwardZhou for more investigation. It’s hard to guess what is causing the error without log files.

This is all nvsdkm directory.
.nvsdkm.zip (764.9 KB)

I tried many times with different options, could you please check sdkm-2021-03-25-12-39-57.log file? I think it is correct one.

Hi goksungur,

Can you please try following steps?

  1. ssh to Jetson device and run command sudo apt purge dnsmasq
  2. Use SDK Manager to select target components only, skip flashing, and reinstall.

We’ll fix the issue on server soon.

Hi Edward,
Thank you very much for your response.
I am a beginner. Could you please write the steps more clearly? How can I do the steps recommended by you?

Should I do these processes in recovery mode?
Should I do all steps expect flashing again? Is there ant difference?

Hi goksungur,

The steps are:

  1. ssh to Jetson device and run command sudo apt purge dnsmasq to remove the dnsmasq package on Jetson.
  2. Restart SDK Manager, select JetPack 4.5.1, and install everything except flashing.

The answers to your questions:

  1. No. recovery mode is only used for flashing. So please do NOT put device to recovery mode.
  2. Yes, do all steps except flashing again.
  1. Connect the target device to host over USB Type-c cable. There is no ethernet connection between them.
  2. Power on the target device normally.
  3. ssh from host to target via 192.168.55.1 ip address and run sudo apt purge dnsmasq.
  4. In Second step of SDK Manager skip the first prompt which is about flash.
  5. In the other installation prompt install SDK components only.

Is it recommended process, right? I am sorry for my re-questions. I ask just for conformation to learn.
Thank you again
Regards.

Hi goksungur,

Your detailed steps are correct. Please go ahead with these steps. Thank you.

Hi again Edward,

I applied the recommended steps but same issue still continues.
The results of command which I run via ssh:
Reading package lists… Done
Building dependency tree
Reading state information… 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
libqt5quickwidgets5 libqt5sql5 libqt5test5 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 packages will be REMOVED:
dnsmasq*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 73,7 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database … 158429 files and directories currently installed.)
Removing dnsmasq (2.79-1ubuntu0.2) …
(Reading database … 158421 files and directories currently installed.)
Purging configuration files for dnsmasq (2.79-1ubuntu0.2) …
Processing triggers for systemd (237-3ubuntu10.43) …

After that, in SDK Manager I skipped the flash section, and while SDK components installation process failed with same error. This is the lastest log file.
last_logs.zip (26.5 KB)

Also when I run dpkg -l | grep dnsmasq command in target, the result is

ii dnsmasq-base 2.79-1ubuntu0.2 arm64 Small caching DNS proxy and DHCP/TFTP server

Hi again Edward,

Elhamdulillah, the issue has solved.
The device is flashed again after that your recommended is applied again.
Thank you very much for your support.

I have an another question. Now I have an internet connection over USB now.
Is this connection only for once?
Can I establish this internet connection again?

Hi goksungur,

Glad to know that now you can install the target SDKs.
Yes, you can establish the internet connection by running scripts on host.
The script is in ~/.nvsdkm/dist/sdkml3_jetpack_l4t_451.json file, like the following:

  eth_port_name=$(ip route show default | awk '/default via/ {print $5; exit}')
  if [[ $eth_port_name == '' ]]; then
     echo 'Could not find route default $eth_port_name, device mode setup failed!'
     exit 0
  fi
  echo 'Found route default' $eth_port_name', setting up device mode'
  setup_t='192.168.55.0/24'
  sudo iptables -t nat -A POSTROUTING -s $setup_t -o $eth_port_name -j MASQUERADE
  sudo iptables -A FORWARD -s $setup_t -o $eth_port_name -j ACCEPT
  sudo iptables -A FORWARD -d $setup_t -m state --state ESTABLISHED,RELATED -i $eth_port_name -j ACCEPT
  sudo sysctl -w net.ipv4.ip_forward=1
  check_google_dns=$(dig @8.8.8.8 nvidia.com || true)
  if [[ $check_google_dns == *'Got answer'* ]]; then
     echo 'Device mode on host successfuly set with DNS 8.8.8.8!'
     exit 0
  else
     echo 'Default google DNS is not working, trying to find a valid server in local host settings!'
     dns_list=$(nmcli -t device show $eth_port_name | grep 'DNS' | grep -o '[^:]*$')
     for dns in $dns_list; do 
         check_dns=$(dig @$dns nvidia.com || true)
         if [[ $check_dns == *'Got answer'* ]]; then
             sudo iptables -t nat -A PREROUTING -p tcp -d 8.8.8.8 --dport 53 -j DNAT --to-destination $dns
             sudo iptables -t nat -A PREROUTING -p udp -d 8.8.8.8 --dport 53 -j DNAT --to-destination $dns
             echo 'Device mode on host successfuly set with DNS' $dns'!'
             exit 0
         fi
     done
     echo 'Could not find a valid DNS server, device mode setup failed!'
     echo 'If needed to use device mode, please change the target default dns to a valid server by following the steps in release note.'
     exit 0
  fi

Thank you again Edward.
Should I establish this connection via an ethernet cable plugged from my host computer to Jetson?
OR
Should I use USB-C cable like flashing process?
Is there any differences?
And should I run the script via ./sdkml3_jetpack_l4t_451.json command?
Thank you again for your interest.
Regards!

Hi goksungur,

If you connect an ethernet cable to Jetson device, then you don’t need run above script to set up internet connection.
USB-C cable is always needed when flashing the image to Jetson device. Ethernet cable can only be used to set up network connection.
The sdkml3_jetpack_l4t_451.json file is of json format and cannot be run directly. It contains commands to be parsed and run by SDK Manager. Usually you don’t need read this file. You only need read it if you want to do some workaround or check how SDK Manager installs a component.