Failed to install jetpack through qemu

I want to install jetpack in qemu mode provided by nvidia. The script is as follows
cp “${host_qemu_path}” “${target_qemu_path}”
chmod 755 “${target_qemu_path}”

mount /sys ./sys -o bind
mount /proc ./proc -o bind
mount /dev ./dev -o bind
mount /dev/pts ./dev/pts -o bind

if [ -s etc/resolv.conf ]; then
	sudo mv etc/resolv.conf etc/resolv.conf.saved
fi
if [ -e "/run/resolvconf/resolv.conf" ]; then
	sudo cp /run/resolvconf/resolv.conf etc/
elif [ -e "/etc/resolv.conf" ]; then
	sudo cp /etc/resolv.conf etc/
fi

sudo LC_ALL=C chroot . apt-get update
sudo LC_ALL=C chroot . apt-get install nvidia-jetpack



sudo LC_ALL=C chroot . sync
sudo LC_ALL=C chroot . apt-get clean
sudo LC_ALL=C chroot . sync

if [ -s etc/resolv.conf.saved ]; then
	sudo mv etc/resolv.conf.saved etc/resolv.conf
fi

umount ./sys
umount ./proc
umount ./dev/pts
umount ./dev

rm "${target_qemu_path}"

rm -rf var/lib/apt/lists/*
rm -rf dev/*
rm -rf var/log/*
rm -rf var/cache/apt/archives/*.deb
rm -rf var/tmp/*
rm -rf tmp/*

popd > /dev/null

The following error appears at the end of the installation

Setting up nsight-systems-2022.5.2 (2022.5.2.171-32559007v0) …
Fatal error occurred: Unsupported Linux aarch64 platform.
dpkg: error processing package nsight-systems-2022.5.2 (–configure):
installed nsight-systems-2022.5.2 package post-installation script subprocess returned error exit status 1
Setting up libnvparsers8 (8.5.2-1+cuda11.4) …
Setting up libnpp-dev-11-4 (11.4.0.287-1) …
Setting up cuda-libraries-11-4 (11.4.19-1) …
dpkg: dependency problems prevent configuration of nvidia-nsight-sys:
nvidia-nsight-sys depends on nsight-systems-2022.5.2 (= 2022.5.2.171-32559007v0); however:
Package nsight-systems-2022.5.2 is not configured yet.

dpkg: error processing package nvidia-nsight-sys (–configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up cuda-gdb-11-4 (11.4.298-1) …
Setting up cuda-nvrtc-dev-11-4 (11.4.300-1) …
Setting up libnvinfer-plugin8 (8.5.2-1+cuda11.4) …
Setting up python3.9 (3.9.5-3ubuntu0~20.04.1) …
Setting up libcufft-dev-11-4 (10.6.0.202-1) …
Setting up nvidia-opencv-dev (5.1.1-b56) …
dpkg: dependency problems prevent configuration of nvidia-jetpack-dev:
nvidia-jetpack-dev depends on nvidia-nsight-sys (= 5.1.1-b56); however:
Package nvidia-nsight-sys is not configured yet.

dpkg: error processing package nvidia-jetpack-dev (–configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure

What is the cause

Hi,

I’m not sure why apt also tried to install Nsight as it’s only available on x86.
What if you replace nvidia-jetpack with nvidia-jetpack-runtime and nvidia-jetpack-dev?

Also try adding this command into your script to see what is getting installed:

sudo apt show nvidia-jetpack

I’m not sure why installing jetpack via qemu, Nvidia-Jetpack-dev relies on Nsight, so installing nvidia-jetpack with Nvidia-Jetpack-Runtime still fails

sudo apt show nvidia-jetpack

Package: nvidia-jetpack
Version: 5.1.1-b56
Priority: standard
Section: metapackages
Maintainer: NVIDIA Corporation
Installed-Size: 199 kB
Depends: nvidia-jetpack-runtime (= 5.1.1-b56), nvidia-jetpack-dev (= 5.1.1-b56)
Homepage: Jetson - Embedded AI Computing Platform | NVIDIA Developer
Download-Size: 29.3 kB
APT-Manual-Installed: yes
APT-Sources: https://repo.download.nvidia.com/jetson/common r35.3/main arm64 Packages
Description: NVIDIA Jetpack Meta Package

Hi,

I’m getting the same error as you did, and I’ll check with our team to see if such use case is supported.

Thank you very much and look forward to your team solving this problem.

Hi,

you can find the following script snippet inside the prerm and postinst file from control.tar.gz from the .deb package of nsight-systems.

tegra_based=$(find /proc/device-tree/ -maxdepth 1 -name 'tegra*' 2>/dev/null)
desktop_gpu_driver=$(lsmod | grep 'nvidia' 2>/dev/null)
mobile_gpu_driver=$(lsmod | grep 'nvgpu' 2>/dev/null)
if [ -n "$tegra_based" ] && ([ -n "$desktop_gpu_driver" ] || [ -n "$mobile_gpu_driver" ]); then
    arm_target_path="target-linux-tegra-armv8/nsys"
elif [ -n "$desktop_gpu_driver" ] ; then
    arm_target_path="target-linux-sbsa-armv8/nsys"
else
    echo "Fatal error occurred: Unsupported Linux aarch64 platform."
    exit 1
fi

So apparently, this script will check the type of platform it is running on, and as you are not running on a native Jetson, the device tree info would not be present.

In short, I think it’s simply not supported.

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