Tx2 apply_binaries.sh dpkg: error processing package (L4T_32.4.2)

Hi,

I was trying to prepare os image for Jetson Tx2 and ran apply_binaries.sh script for it. And got the error message saying that

 Errors were encountered while processing:
   nvidia-l4t-graphics-demos
   nvidia-l4t-gstreamer
   nvidia-l4t-jetson-io
   nvidia-l4t-multimedia
   nvidia-l4t-multimedia-utils
   nvidia-l4t-weston
   nvidia-l4t-kernel-dtbs
   nvidia-l4t-camera

And for all those errors, it previously gave the following errors for each nvidia-l4t- basic package

dpkg: error processing package <nvidia-l4t->

You can see the full error log here apply_binaries_error.log (13.1 KB)

I was successfully running apply_binaries.sh script on L4T_32.2.1 version. Something has changed between those versions and I couldn’t find what was that.

This is the previously ran L4T_32.2.1 version of apply_binaries.sh script result l4t_32_2_1_apply_binaries_successfull.log (2.2 KB)

Just guessing, but if not installed try installing (on the host PC) package “qemu-user-static” ("sudo apt-get install qemu-user-static"), and if you must install this, then also, after the install, run “sudo dpkg-reconfigure qemu-user-static”. This might just be an issue with QEMU component install order.

Thanks for reporting this. We will check.

Are you able to use the sdkmanager at this moment?

I have already had “qemu-user-static” and used for creating custom rootfs and installing packages to that. I have executed “ sudo dpkg-reconfigure qemu-user-static ” but nothing has changed. The issue with “dpkg: error processing package …” errors still persist.

I am not using sdkmanager actively for flashing Jetson at this moment. I am using this only for getting CUDA 10.2’s download link. I am flashing Jetson manually.

Hi,

Actually,

  1. We don’t see such issue in our driver package, just tried but no issue.
  2. SDKmanager is also using Linux_for_Tegra. It downloads Linux_for_Tegra on your host and uses it to do the flash.

Hi,

Could you also share your foreign architecture in dpkg?

I didn’t understand the question but is this what you are asking? I’ve executed dpkg-architecture and got this result

DEB_BUILD_ARCH=arm64
DEB_BUILD_ARCH_ABI=base
DEB_BUILD_ARCH_BITS=64
DEB_BUILD_ARCH_CPU=arm64
DEB_BUILD_ARCH_ENDIAN=little
DEB_BUILD_ARCH_LIBC=gnu
DEB_BUILD_ARCH_OS=linux
DEB_BUILD_GNU_CPU=aarch64
DEB_BUILD_GNU_SYSTEM=linux-gnu
DEB_BUILD_GNU_TYPE=aarch64-linux-gnu
DEB_BUILD_MULTIARCH=aarch64-linux-gnu
DEB_HOST_ARCH=arm64
DEB_HOST_ARCH_ABI=base
DEB_HOST_ARCH_BITS=64
DEB_HOST_ARCH_CPU=arm64
DEB_HOST_ARCH_ENDIAN=little
DEB_HOST_ARCH_LIBC=gnu
DEB_HOST_ARCH_OS=linux
DEB_HOST_GNU_CPU=aarch64
DEB_HOST_GNU_SYSTEM=linux-gnu
DEB_HOST_GNU_TYPE=aarch64-linux-gnu
DEB_HOST_MULTIARCH=aarch64-linux-gnu
DEB_TARGET_ARCH=arm64
DEB_TARGET_ARCH_ABI=base
DEB_TARGET_ARCH_BITS=64
DEB_TARGET_ARCH_CPU=arm64
DEB_TARGET_ARCH_ENDIAN=little
DEB_TARGET_ARCH_LIBC=gnu
DEB_TARGET_ARCH_OS=linux
DEB_TARGET_GNU_CPU=aarch64
DEB_TARGET_GNU_SYSTEM=linux-gnu
DEB_TARGET_GNU_TYPE=aarch64-linux-gnu
DEB_TARGET_MULTIARCH=aarch64-linux-gnu

I have created my base ubuntu with this command: qemu-debootstrap --arch arm64 bionic .
Then I have added user and configured internet, installed some basic packages (vim openssh-server g++ build-essential etc.) After that, without the CUDA added, I wanted to just flash this rootfs. I guess, l4t base packages need some packages which are dependent to them. Your sample_root_filesystem is already has these packages I guess.
I manually checked every l4t base packages and found which packages are needed in order to install that package. I have installed them recursively (If those packages are dependent on another package). At last, I’ve executes “apt-get install ./${package} --no-upgrade -y” where package is l4t base packages (For example: nvidia-l4t-core_32.4.2-20200408182620_arm64.deb ) and all seems installed. I exited from qemu-aarch64-static and tried apply_binaries.sh but still giving the same dependency errors.

There is an option “–print-foreign-architecture” for dpkg tool.

dpkg --print-foreign-architectures

It prints nothing inside rootfs.
My development pc prints : i386

Ok, then I think the problem you have is due to using the custom rootfs.

Could you try to use our sample rootfs and see if you have such issue?

It seems you miss lots of dependencies here.

I used your sample rootfs. apply_binaries.sh ran smoothly. But I might find a solution now. I will return to you if that goes well.

You could check the first missing in your log is

Package libwayland-egl1 is not installed.

and then you have a lot of missing. Let’s see if you could install it when running qemu on rootfs first.

When I run sudo ./apply_binaries.sh for the second time, it will report the error as follows:
`groupadd: group ‘crypto’ already exists
groupadd: group ‘trusty’ already exists
dpkg: error processing package nvidia-l4t-init (–install):
installed nvidia-l4t-init package post-installation script subprocess returned error exit status 9
Setting up nvidia-l4t-multimedia-utils (32.4.2-20200408182620) …
Setting up nvidia-l4t-oem-config (32.4.2-20200408182620) …
Setting up nvidia-l4t-tools (32.4.2-20200408182620) …
Setting up nvidia-l4t-wayland (32.4.2-20200408182620) …
Setting up nvidia-l4t-weston (32.4.2-20200408182620) …
dpkg: dependency problems prevent configuration of nvidia-l4t-x11:
nvidia-l4t-x11 depends on nvidia-l4t-init (= 32.4.2-20200408182620); however:
Package nvidia-l4t-init is not configured yet.

dpkg: error processing package nvidia-l4t-x11 (–install):
dependency problems - leaving unconfigured
Setting up nvidia-l4t-xusb-firmware (32.4.2-20200408182620) …
Pre-installing xusb firmware package, skip flashing
Setting up nvidia-l4t-kernel (4.9.140-tegra-32.4.2-20200408182620) …
Setting up nvidia-l4t-kernel-dtbs (4.9.140-tegra-32.4.2-20200408182620) …
Setting up nvidia-l4t-kernel-headers (4.9.140-tegra-32.4.2-20200408182620) …
Unpacking kernel headers…
Setting up nvidia-l4t-bootloader (32.4.2-20200408182620) …
Pre-installing bootloader package, skip flashing
dpkg: dependency problems prevent configuration of nvidia-l4t-3d-core:
nvidia-l4t-3d-core depends on nvidia-l4t-init (= 32.4.2-20200408182620); however:
Package nvidia-l4t-init is not configured yet.
nvidia-l4t-3d-core depends on nvidia-l4t-x11 (= 32.4.2-20200408182620); however:
Package nvidia-l4t-x11 is not configured yet.

dpkg: error processing package nvidia-l4t-3d-core (–install):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-l4t-camera:
nvidia-l4t-camera depends on nvidia-l4t-3d-core (= 32.4.2-20200408182620); however:
Package nvidia-l4t-3d-core is not configured yet.

dpkg: error processing package nvidia-l4t-camera (–install):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-l4t-cuda:
nvidia-l4t-cuda depends on nvidia-l4t-3d-core (= 32.4.2-20200408182620); however:
Package nvidia-l4t-3d-core is not configured yet.

dpkg: error processing package nvidia-l4t-cuda (–install):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-l4t-graphics-demos:
nvidia-l4t-graphics-demos depends on nvidia-l4t-3d-core (= 32.4.2-20200408182620); however:
Package nvidia-l4t-3d-core is not configured yet.

dpkg: error processing package nvidia-l4t-graphics-demos (–install):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-l4t-gstreamer:
nvidia-l4t-gstreamer depends on nvidia-l4t-camera (= 32.4.2-20200408182620); however:
Package nvidia-l4t-camera is not configured yet.
nvidia-l4t-gstreamer depends on nvidia-l4t-cuda (= 32.4.2-20200408182620); however:
Package nvidia-l4t-cuda is not configured yet.

dpkg: error processing package nvidia-l4t-gstreamer (–install):
dependency problems - leaving unconfigured
Setting up nvidia-l4t-initrd (32.4.2-20200408182620) …
Setting up nvidia-l4t-jetson-io (32.4.2-20200408182620) …
dpkg: dependency problems prevent configuration of nvidia-l4t-multimedia:
nvidia-l4t-multimedia depends on nvidia-l4t-3d-core (= 32.4.2-20200408182620); however:
Package nvidia-l4t-3d-core is not configured yet.
nvidia-l4t-multimedia depends on nvidia-l4t-cuda (= 32.4.2-20200408182620); however:
Package nvidia-l4t-cuda is not configured yet.

dpkg: error processing package nvidia-l4t-multimedia (–install):
dependency problems - leaving unconfigured
Processing triggers for nvidia-l4t-kernel (4.9.140-tegra-32.4.2-20200408182620) …
Errors were encountered while processing:
nvidia-l4t-init
nvidia-l4t-x11
nvidia-l4t-3d-core
nvidia-l4t-camera
nvidia-l4t-cuda
nvidia-l4t-graphics-demos
nvidia-l4t-gstreamer
nvidia-l4t-multimedia
`

Hi qinyyuu,

This is a known issue and will be resolved in next release. For now, you could manually remove " trusty" and “crypto” group in rootfs/etc/group and run apply_binaries.sh again.

1 Like

Hi,
I have solved my package installation problem. I have commented out the installation package command inside nv_tegra/nv-apply-debs.sh script. These two commands specifically:

LC_ALL=C chroot . dpkg -i --path-include="/usr/share/doc/*" "${pre_deb_list[@]}"
LC_ALL=C chroot . dpkg -i --path-include="/usr/share/doc/*" "${deb_list[@]}" 

I have used this script only for retrieving packages. Then I have switched out to my custom rootfs and ran systemd-nspawn with qemu-aarch64-static. After that, for each nvidia base package, I have executed this command dpkg -I <package_name> . This command gave me which pre dependent packages need to be installed, which packages are needed by this package in order to be installed. Then I have written a script to find order of installation these base packages which are inside /opt/nvidia/l4t-packages/ with four categories; bootloader, userspace, kernel and standalone. After extracting the order of installation, installed base packages one by one by apt-get install ${package_path} --no-upgrade -y and packages which are non nvidia base packages. With installing nvidia base packages in order solved by problem.

Installation order sorted package list is here if anyone is interested:

/opt/nvidia/l4t-packages/userspace/nvidia-l4t-core_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/standalone/python-jetson-gpio_2.0.8_arm64.deb
/opt/nvidia/l4t-packages/standalone/python3-jetson-gpio_2.0.8_arm64.deb
/opt/nvidia/l4t-packages/standalone/jetson-gpio-common_2.0.8_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-firmware_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-multimedia-utils_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-weston_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-configs_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-wayland_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/kernel/nvidia-l4t-kernel_4.9.140-tegra-32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-tools_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-init_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-apt-source_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-oem-config_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-xusb-firmware_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-jetson-io_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-initrd_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-x11_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/kernel/nvidia-l4t-kernel-headers_4.9.140-tegra-32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/bootloader/nvidia-l4t-bootloader_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/kernel/nvidia-l4t-kernel-dtbs_4.9.140-tegra-32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-3d-core_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-graphics-demos_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-cuda_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-multimedia_32.4.2-20200408182620_arm64.deb
/opt/nvidia/l4t-packages/userspace/nvidia-l4t-camera_32.4.2-20200408182620_arm64.deb