There seems to be somthing wrong with using qemu to run apt-get inside the target file system, however I can’t figure out what is going wrong. Have anyone experienced this before and could point me in the right direction? ( I have run the apt-get to install qemu :) )
Hi, thanks for the quick response.
My version is L4T 35.1.
The error message is written in the first post:
chroot: failed to run command ‘apt-get’: Exec format error
The error message originates from
nvubuntu_samplefs.sh line 117: “sudo LC_ALL=C chroot . apt-get update”
If I understand this line correctly it is trying to run apt-get inside the target fs. However the apt-get in the target fs is compiled for aarch64 but my host machine is x86_64.
When running the ARMv8-a tools on the host PC during install it uses QEMU (without this it would try to use a tool of the wrong architecture for the PC, which is what the “Exec format error” relates to, though it does not say why QEMU did not do its job). What do you see (on the host PC) from: dpkg -l | grep -i qemu
First make sure package “qemu-user-static” is installed on the host. Then copy the file /usr/bin/qemu-aarch64-static from the host to the rootfs/usr/bin/
‘Exec format error’ error should then go away.
Installing qemu-user-static on host seems to be working, I had to manually create the usr/bin folder inside the rootfs folder before copying qemu-aarch-static there.
Thank you so much for helping me solving this issue :) especially user100090 :)