AGX Xavier installation is failed due to command 'dpkg': Exec format error

Hi , I’m struggling to install Jet Pack 4.6.1 via SDK manager.
But Jetson OS image installation is always failed as below.

"
11:34:06 ERROR: File System and OS - target_image: chroot: failed to run command ‘dpkg’: Exec format error
11:34:06 ERROR: File System and OS - target_image: command terminated with error
11:34:06 SUMMARY: File System and OS - target_image: First Error: Installation failed.

"

I tried refresh components download folder manually and using SDK manager uninstall menu.
Although surfing the web, but I cannot good resolution.

host : Ubuntu 18.04LTS no repository trouble in apt packages. AGX Xavier Make sure changed recovery mode and it is recognized in SDK manager. Host PC and Xavier is connected by attached USB type A-C cable.

After Checking similar issue and topics, I tried CLI install.
But Jetson OS creating is failed around 60% in any version…
Command line is CLI command generated one.

result is here

Login succeeded.
Loading user information…
User information loaded successfully.
Loading server data…
Server data loaded successfully.
Session initialized…

===== INSTALLATION FAILED =====
- CUDA on Host: Up-to-date
- CUDA Cross Compile Package on Host: Failed
- VisionWorks on Host: Up-to-date
- VPI on Host: Up-to-date
- NVIDIA Nsight Graphics: Up-to-date
- NVIDIA Nsight Systems: Up-to-date
- Drivers for Jetson: Up-to-date
- File System and OS: Failed
- Flash Jetson AGX Xavier: DependencyFailure
- DateTime Target Setup: DependencyFailure
- CUDA Toolkit for L4T: DependencyFailure
- cuDNN on Target: DependencyFailure
- TensorRT on Target: DependencyFailure
- OpenCV on Target: DependencyFailure
- VisionWorks on Target: DependencyFailure
- VPI on Target: DependencyFailure
- NVIDIA Container Runtime with Docker integration (Beta): DependencyFailure
- Multimedia API: DependencyFailure
- NVIDIA Nsight Systems CLI: DependencyFailure
- DeepStream: DependencyFailure

===== Installation failed - Total 20 components =====
===== 0 succeeded, 2 failed, 6 up-to-date, 12 skipped =====

one more

error: Err:1 file:/var/cuda-repo-cross-aarch64-ubuntu1804 ││ ││-10-2-local cuda-nsight-compute-addon-l4t-10-2 ││ Review SDK Manager terminal for the specific error/s. ││10.2.460-1 ││ OK ││info: Hash Sum mismatch

Something to clarify is that JetPack/SDK Manager itself runs only on a desktop PC architecture. If you try to install and run sdkmanager directly on a Jetson you will get an “exec format error” since it is the wrong architecture. The PC uses JetPack/SDKM to flash “Linux for Tegra” (“L4T”…Ubuntu plus NVIDIA drivers) to the Jetson since a Jetson does not have a BIOS and needs an assisting computer during the flash. Any “exec format error” is highly suspicious.

The flash installs only the base operating system. Optional components, e.g., CUDA, only occurs after the system fully boots. During a normal flash, after the flash completes, the Jetson will then automatically reboot for first boot account setup. When that account setup is completed, then those optional components (like CUDA) are installed via ssh from the host PC to the fully booted Jetson (it only appears that CUDA install is part of flash, but that is an illusion, and although the installer is doing this, the Jetson has already been flashed and booted at that point).

Are your host PC and Jetson both connected to the Internet?

Thank you for your advice.

I modified some host PC setting around USB hub function.
After that progress is better than yesterday.
But around 95-99% failed due to the several error which is one of example.

Yes, normally success the flash target Xavier, reboot automatically.
My Xavier is intalled Jetpack 4.6. But in the flash process, it was not removed and
started original JetPack started.

20:11:11 INFO: File System and OS - target_image: set +e; $1 2>$tmp_log; CMD_STATUS=${PIPESTATUS[0]}; set -e
20:11:11 INFO: File System and OS - target_image: else
20:11:11 INFO: File System and OS - target_image: echo “Unhandled error when running $1: tr '\n' '; ' <$tmp_log” 1>&2; exit 1
20:11:11 INFO: File System and OS - target_image: fi
20:11:11 INFO: File System and OS - target_image: done
20:11:11 INFO: File System and OS - target_image: if [ $CMD_STATUS -eq 0 ] && [ $TIMES -ne 1 ]; then
20:11:11 INFO: File System and OS - target_image: echo “safe apt install succeed. retry number: $TIMES.”
20:11:11 INFO: File System and OS - target_image: fi
20:11:11 INFO: File System and OS - target_image: }
20:11:11 INFO: File System and OS - target_image: sudo tar xpf /home/mkane4/Downloads/nvidia/sdkm_downloads/Tegra_Linux_Sample-Root-Filesystem_R34.1.1_aarch64.tbz2
20:11:11 INFO: File System and OS - target_image: cd …
20:11:11 INFO: File System and OS - target_image: sudo ./tools/l4t_flash_prerequisites.sh
20:11:11 INFO: File System and OS - target_image: safe_apt_install “sudo apt-get install -y binutils” 5
20:11:11 INFO: File System and OS - target_image: sudo ./apply_binaries.sh
20:11:11 INFO: File System and OS - target_image: sudo mkdir -p rootfs/opt/nvidia/deb_repos
20:11:11 INFO: File System and OS - target_image: **********************
20:11:11 INFO: File System and OS - target_image: exec_command: /tmp/tmp_NV_L4T_FILE_SYSTEM_AND_OS_T194_COMP.sh
20:13:47 INFO: File System and OS - target_image: Get:1 file:/var/cuda-repo-cross-aarch64-ubuntu1804-10-2-local InRelease
20:13:47 INFO: File System and OS - target_image: Ign:20 file:/var/lib/local-apt-repository ./ Release.gpg
20:13:47 INFO: File System and OS - target_image: Hit:22 https://nvidia.github.io/libnvidia-container/experimental/ubuntu18.04/amd64 InRelease
20:13:47 INFO: File System and OS - target_image: Get:26 https://nvidia.github.io/nvidia-container-runtime/stable/ubuntu18.04/amd64 InRelease [1,481 B]
20:13:47 INFO: File System and OS - target_image: Hit:29 https://repo.download.nvidia.com/jetson/x86_64/bionic r32.6 InRelease
20:13:47 INFO: File System and OS - target_image: Hit:23 https://repo.download.nvidia.com/jetson/x86_64/bionic r34.1 InRelease
20:13:47 INFO: File System and OS - target_image: Hit:35 Index of /ubuntu bionic InRelease
20:13:47 INFO: File System and OS - target_image: Get:36 Index of /ubuntu bionic-updates InRelease [88.7 kB]
20:13:48 INFO: File System and OS - target_image: Get:37 Index of /ubuntu bionic-backports InRelease [74.6 kB]
20:13:48 INFO: File System and OS - target_image: Get:38 Index of /ubuntu bionic-updates/main amd64 DEP-11 Metadata [297 kB]
20:13:49 INFO: File System and OS - target_image: Get:39 Index of /ubuntu bionic-updates/universe amd64 DEP-11 Metadata [302 kB]
20:13:49 INFO: File System and OS - target_image: Get:40 Index of /ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,464 B]
20:13:49 INFO: File System and OS - target_image: Get:41 Index of /ubuntu bionic-backports/universe amd64 DEP-11 Metadata [9,272 B]
20:13:52 INFO: File System and OS - target_image: Fetched 843 kB in 2s (376 kB/s)
20:13:53 INFO: File System and OS - target_image: Reading package lists…
20:13:53 INFO: File System and OS - target_image: Reading package lists…
20:13:53 INFO: File System and OS - target_image: Building dependency tree…
20:13:53 INFO: File System and OS - target_image: Reading state information…
20:13:53 INFO: File System and OS - target_image: The following packages have unmet dependencies:
20:13:54 INFO: File System and OS - target_image: cuda-visual-tools-10-2 : Depends: cuda-nvml-dev-10-2 (>= 10.2.300) but it is not going to be installed
20:13:54 ERROR: File System and OS - target_image: E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).
20:13:54 ERROR: File System and OS - target_image: command terminated with error
20:13:54 SUMMARY: Flash Jetson AGX Xavier - flash: First Error: Depends on failed component
20:13:54 DEBUG: running command < true >
20:13:54 INFO: command finished successfully

~$ sudo apt install -f [sudo] password for mkane4: 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: debhelper dh-autoreconf dh-strip-nondeterminism libarchive-cpio-perl libegl1-mesa-dev libeigen3-dev libfile-stripnondeterminism-perl libgles2-mesa-dev libglib2.0-dev libglib2.0-dev-bin libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev liborc-0.4-dev liborc-0.4-dev-bin libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libwayland-bin libwayland-dev Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: cuda-cudart-10-2 cuda-cudart-dev-10-2 cuda-cupti-10-2 cuda-cupti-dev-10-2 cuda-driver-dev-10-2 cuda-nvcc-10-2 cuda-nvml-dev-10-2 cuda-nvprof-10-2 cuda-nvrtc-10-2 cuda-nvrtc-dev-10-2 cuda-nvtx-10-2 libcublas-dev libcublas10 libcufft-10-2 libcufft-dev-10-2 libcurand-10-2 libcurand-dev-10-2 libcusolver-10-2 libcusolver-dev-10-2 libcusparse-10-2 libcusparse-dev-10-2 libnvjpeg-10-2 libnvjpeg-dev-10-2 The following NEW packages will be installed: cuda-cudart-10-2 cuda-cudart-dev-10-2 cuda-cupti-10-2 cuda-cupti-dev-10-2 cuda-driver-dev-10-2 cuda-nvcc-10-2 cuda-nvml-dev-10-2 cuda-nvprof-10-2 cuda-nvrtc-10-2 cuda-nvrtc-dev-10-2 cuda-nvtx-10-2 libcublas-dev libcublas10 libcufft-10-2 libcufft-dev-10-2 libcurand-10-2 libcurand-dev-10-2 libcusolver-10-2 libcusolver-dev-10-2 libcusparse-10-2 libcusparse-dev-10-2 libnvjpeg-10-2 libnvjpeg-dev-10-2 dpkg: error processing archive /tmp/apt-dpkg-install-6rjfqr/22-cuda-nvml-dev-10-2_10.2.300-1_amd64.deb (--unpack): trying to overwrite '/usr/local/cuda-10.2/include', which is also in package libnpp-dev-10-2 10.2.1.300-1 No apport report written because MaxReports is reached already Errors were encountered while processing: /tmp/apt-dpkg-install-6rjfqr/00-cuda-cudart-10-2_10.2.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/01-cuda-driver-dev-10-2_10.2.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/02-cuda-cudart-dev-10-2_10.2.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/03-cuda-nvcc-10-2_10.2.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/04-cuda-cupti-10-2_10.2.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/05-cuda-cupti-dev-10-2_10.2.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/06-cuda-nvprof-10-2_10.2.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/07-cuda-nvtx-10-2_10.2.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/08-cuda-nvrtc-10-2_10.2.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/09-cuda-nvrtc-dev-10-2_10.2.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/10-libcusolver-10-2_10.3.0.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/11-libcusolver-dev-10-2_10.3.0.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/12-libcublas10_10.2.3.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/13-libcublas-dev_10.2.3.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/14-libcufft-10-2_10.1.2.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/15-libcufft-dev-10-2_10.1.2.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/16-libcurand-10-2_10.1.2.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/17-libcurand-dev-10-2_10.1.2.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/18-libcusparse-10-2_10.3.1.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/19-libcusparse-dev-10-2_10.3.1.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/20-libnvjpeg-10-2_10.3.1.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/21-libnvjpeg-dev-10-2_10.3.1.300-1_amd64.deb /tmp/apt-dpkg-install-6rjfqr/22-cuda-nvml-dev-10-2_10.2.300-1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

At last host PC only connect internet. cannot use 192.168.55.1
I think Xavier connect same network with host PC. is it right?
My setup is implemented manual mode now.

Yes, if the USB is connected, then the Jetson has IP address 192.168.55.1, while the host PC has 192.168.55.100; then it is up to the host PC to forward its network to the Jetson through that (which might fail since some settings would prevent this, but the default case should work).

Btw, it is better to just attach a log as a file instead of pasting since the forum formatting can alter appearance. Surrounding the log as “code” (icon looks like “</>”) helps, but then the scrollbars limit things at times, so a file is still better.

I don’t see any exec format error in that most recent log, so I guess this is from the PC.

When you do move to a different release I will recommend using the most recent JetPack/SDK Manager (except only use the 5.x release if you are testing the developer preview), and start it with option “--archivedversions”:
sdkmanager --archivedversions

Based on the most recent log it looks like the host PC itself needs this:

sudo apt update
sudo apt --fix-broken install

Does the above work on the PC? If so, does flash then succeed?

Thank you for the advice.
I could install Ubuntu20.04 into AGX Xavier at once.
But when processing create Jetson OS time stopped 99% for long hours.
After I gave up and reset Xavier , it was installed normal Ubuntu 20.04 only.

Btw I attached the log file here.
If it is difficult, I’ll use other ubuntu PC… struggling this issue over 3days. haha
SDKM_logs_JetPack_5.0.1_DP_Linux_for_Jetson_AGX_Xavier_modules_2022-07-31_08-27-49.zip (94.5 KB)

Btw I could execute " sudo ./nvsdkmanager_flash.sh --no flash" to create python file.
And normal Ubuntu 20.04 is installable now.

It sounds like it is working now, but I’m not sure. Partly this is because I also don’t know what “normal Ubuntu 20.04” is. Are you saying install now works and the problem is solved?

Hi !
Sorry for my poor English. Plz let me explain about “normal Ubuntu 20.04”.

I was following the terminal , Flashing OS was finished. but System is not reboot as usual.
That’s why i pressed reset button by myself.
Exactly that Ubuntu is not installed JetPack. Plane OS only.

And Today I visited office and try to install JetPack5.0.1DP.
At that time CUDA installation was failed due to unpack the deb package.
After Flash Jetson OS process, Abnormal Jetson OS 5.0.1DP started.
Looks like success. but CUDA packages for Jetson is not installed
SDKM_logs_JetPack_5.0.1_DP_Linux_for_Jetson_AGX_Xavier_modules_2022-08-01_10-48-29.zip (287.8 KB)

For your reference

Anyway my install trouble is not solved.

Can you provide a serial console boot log? The screenshot sort of looks ok, but there is no context as to what came before.

FYI, CUDA and other optional content only get installed after the system flash completes and reboots. The nvidia-l4t-cuda could not have existed there unless flash was complete and first boot account setup was successful. I don’t know what command was run when you encountered an error. A serial console boot log would be useful at this point; note that you can log the serial console boot, and try whatever software install method you want from the console, and this too will log.

1 Like

About the failed serial console boot log is included in the previous comment I thought.
Please let me check the host PC logs.
Sorry AGX is not on my hand now due to office working.

Regarding this incomplete Jet Pack 5.01DP, installing CUDA packages in the SDK manager install process.
But Flashing OS was completed. I don’t know why.
I used 2 Ubuntu SDK manager server to install JetPack 5.0.1DP to AGX Xavier.
Both PC were detected error in different point.

PC A: failed dpkg Jetson OS image → (Normally I used this PC which is quite high spec)
PC B also failed dpkg “CUDA” packages →

I suspect host PC side have something issue. but I’m not sure how I clean the SDK manager components.
Although error point is different for each PC, but failed extracting deb package in the install process.

Although I looked for the log file , I cannot serial console boot log.
Normally I’m using PC A. After back home I’ll check the PC A folders.

Unfortunately, my host system was corrupt. need to reset up again.
I’ll try setup on this Friday.

Exact package commands and errors are very useful. Also, note that much of the SDKM which could be deleted to restart would be to delete “~/.nvsdkm/*”. Not sure how much that helps or not.

1 Like

Thank you for your advise and long time supporting.
Unfortunately my host bash function was broken.
Broken symptom : I 'm facing bash commands failure now.
I think re-install Ubuntu system itself is better in this case.
I write down the process to host terminal failure. for next try.
I’ll try your advise next time or clean install system will not be occurred…!?

  1. I found install image failure from packages folder to JetPack 5.0.1" rootfs" folder.

2.I started chroot manually for install on the other terminal.
3. Ooops! I had mistake to close root terminal coincidentally.
4. Any command is not executed any more in the Linux terminal …

I should close this case at this time.
And I’ll try set up again.

Is it correct that the host PC had the bash error? An exact description of command and error would be useful, it might narrow down to something more specific with that information.

Keep in mind that a CUDA install error would be from a fully booted Jetson, but the error could be either from the Jetson side, or from the connection to the Jetson, and so exact errors are helpful to know which. If it is a connection error, but the flashed Jetson has local login possible, e.g., via serial console or via local console, then it might be easy to fix without flashing again. Note that in JetPack/SDKM it is possible to deselect flash, and to only install components (which you could further limit tojust install CUDA as a test). I am hoping to get it to a fully booted state where only optional package install is the issue.

Regarding this:

…is it correct that this was a host side error related to setting up rootfs prior to JetPack/SDKM sending the rootfs to the Jetson? If setting up rootfs is a problem on the host PC side, then this leads to a quite different issue, and there is a way to manually install and set up rootfs on the host PC to get a better idea of what the issue is. I need exact error messages though, or at least some specific description.

What is the chroot for? Is this related to a VM or container? Normally one would never use chroot for flash. VM and docker are often related to such issues. However, if you want to open a new topic, then you could, but if a VM or docker is involved, then this is likely part of the problem.

1 Like

Sorry for my replying delay

As a result of re-setup main Ubuntu 18.04 PC, I can install Jetpack5.0.1DP completely.

Regarding the your suspicious, I did mixed 2PCs operation.
Yes One of confuse you is WSL2 Ubuntu18.04.
Anyway, My main use is Native Ubuntu PC and completed.

Blockquote
What is the chroot for? Is this related to a VM or container? Normally one would never use chroot for flash. VM and docker are often related to such issues. However, if you want to open a new topic, then you could, but if a VM or docker is involved, then this is likely part of the problem


``

Glad you got it working! Just a note for anyone reading this to help though, the Windows Subsystem for Linux is only a partial user space implementation. Loopback is unavailable for WSL, and thus it is not possible for WSL2 to succeed.