Apt-get install nvidia-jetpack failure in agx orin inside docker

I build image base on R36 base image,
and in image i run apt get install nvidia-jetpack failure.
it report errors
dpkg: error processing archive /var/cache/apt/archives/nvidia-l4t-core_36.2.0-20231218214829_arm64.deb (–unpack):
unable to make backup link of ‘./usr/lib/aarch64-linux-gnu/nvidia/ld.so.conf’ before installing new version: Invalid cross-device link
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/nvidia-l4t-core_36.2.0-20231218214829_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Someone else will probably need to finish this answer, but here some information to get started…

Is this a dev kit? Is this Orin Nano, or just Nano? Is this using a third party carrier board?

All Nano, if a developer’s kit, have an SD card slot on the module itself, and not on the carrier board. The firmware is different for the two.

Only Orin works with L4T R36.x, so if this is Orin, the thread probably needs to be moved to Orin Nano instead of just Nano.

Note that L4T is what actually gets flashed to a Jetson. This is just what Ubuntu ends up being called when the NVIDIA drivers are added. JetPack/SDKM is used as a GUI front end to the flash software, which runs on the host PC if flashing a recovery mode Jetson (SD cards have some pre-built versions, but the Nano and Orin Nano will need a QSPI memory flash between major releases).

On SD card models of Jetsons (such as the Nano dev kit; third party Nanos with eMMC do not work the same way) the QSPI memory on the module itself contains both the boot software and the software equivalent of the BIOS (Jetsons don’t have an actual BIOS). Thus one can flash the QSPI. Major releases of QSPI tend to work with a particular major release of L4T. Going from L4T R35.x to R36.x would imply a need to flash the module’s QSPI on a dev kit.

Many of the optional packages which are related to the GPU (e.g., CUDA) will require a different version of software than what a PC uses. The GPU for a Jetson is an integrated GPU (iGPU) which is directly wired to the memory controller. A PC uses a discrete GPU (dGPU) over the PCI bus, and the software is quite different when comparing the two. The software which works with the Jetson is generally installed via JetPack of the correct release. During a flash the Jetson is in recovery mode, but when this completes, the Jetson automatically reboots; it is once fully booted normally that JetPack adds this optional software via ssh. What isn’t always obvious is that you can uncheck flash in JetPack and uncheck other packages and do nothing more than install a specific package, e.g., CUDA, on a fully booted Jetson.

The normal case is that one installs JetPack after picking the L4T release here (JetPack and L4T releases tend to be tied together):

If you have a newer JetPack release, then you can start it like this to see older L4T releases from the Linux host PC:
sdkmanager --archivedversions

Note that sdkmanager (SDKM) is just a smart network app on top of JetPack. In JetPack 6 you could also start like this to see older releases:
sdkmanager --archived-versions

If you just want to see all JetPack/SDKM releases, then you can go here:
https://developer.nvidia.com/embedded/jetpack-archive