我想在 ubuntu 18.04 上使用 qemu 和 debootstrap 在我的 Jetson Nano 上运行 X86 应用程序。实际上我正在遵循这个教程:
https://www.youtube.com/watch?v=dzAoaFOJy7U&t=338s&ab_channel=NovaspiritTech
这就是发生的事情,我被冻结了:
root@ziomario-desktop:~/Scrivania/qemu-x86# ls
chroot-stretch-i386 log-x86 monta.sh smonta.sh
root@ziomario-desktop:~/Scrivania/qemu-x86# sudo mount -t sysfs /sys/ ./chroot-stretch-i386/sys/
root@ziomario-desktop:~/Scrivania/qemu-x86# sudo mount -t proc /proc/ ./chroot-stretch-i386/proc/
root@ziomario-desktop:~/Scrivania/qemu-x86# sudo mount --bind /dev ./chroot-stretch-i386/dev/
root@ziomario-desktop:~/Scrivania/qemu-x86# sudo mount --bind /dev/pts ./chroot-stretch-i386/dev/pts
root@ziomario-desktop:~/Scrivania/qemu-x86# sudo mount --bind /dev/shm ./chroot-stretch-i386/dev/shm/
root@ziomario-desktop:~/Scrivania/qemu-x86# chroot ./chroot-stretch-i386/ /debootstrap/debootstrap --second-stage
chroot: impossibile eseguire il comando "/debootstrap/debootstrap": No such file or directory
root@ziomario-desktop:~/Scrivania/qemu-x86# sudo cp /usr/bin/qemu-i386-static ./chroot-stretch-i386/usr/bin/
root@ziomario-desktop:~/Scrivania/qemu-x86# sudo chroot ./chroot-stretch-i386/ /debootstrap/debootstrap --second-stage
chroot: impossibile eseguire il comando "/debootstrap/debootstrap": No such file or directory
root@ziomario-desktop:~/Scrivania/qemu-x86# sudo !!
sudo sudo chroot ./chroot-stretch-i386/ /debootstrap/debootstrap --second-stage
chroot: impossibile eseguire il comando "/debootstrap/debootstrap": No such file or directory
root@ziomario-desktop:~/Scrivania/qemu-x86# chroot ./chroot-stretch-i386/ /debootstrap/debootstrap --second-stage
chroot: impossibile eseguire il comando "/debootstrap/debootstrap": No such file or directory
下面你可以看到应该发生什么:
答案1
根据您发布的输出,我认为您在 6:51 跳过了该命令https://pastebin.com/cDbw2nG3。您必须复制qemu-i386-static
到./chroot-stretch-i386/usr/bin
:
sudo cp /usr/bin/qemu-arm-static chroot-stretch-i386/usr/bin
在执行之前:
sudo chroot ./chroot-stretch-i386/ /debootstrap/debootstrap --second-stage
如果您的设备不支持该i386
架构。
您还可以检查binfmt-support
软件包是否已安装,并运行update-binfmts --display
以检查 binfmt 条目是否已注册。