尝试在 ARM 上运行 x86

尝试在 ARM 上运行 x86

我在 M2 Mac 上的虚拟机中运行 Ubuntu 20.04。

我正在尝试按照本教程使用 qemu-user:https://www.kali.org/docs/arm/x86-on-arm/. 运行后

sudo apt update
sudo apt install -y qemu-user-static binfmt-support
sudo dpkg --add-architecture amd64

我运行sudo apt update并得到了这个(这不是打印出来的全部内容,但为了简洁我将其缩短了):

...
Ign:22 http://us.ports.ubuntu.com/ubuntu-ports focal-security/multiverse amd64 Packages
Fetched 3,998 kB in 2s (2,557 kB/s)
Reading package lists... Done
...
E: Failed to fetch http://us.ports.ubuntu.com/ubuntu-ports/dists/focal-updates/main/binary-amd64/Packages  404  Not Found [IP: 91.189.91.39 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

我看到了讨论(如何在非 x86_64 系统上将 amd64(x86_64)包添加到 apt 源中?dpkg --add-architecture amd64 之后的 Apt-get 更新错误 - Ubuntu 18.04.4 LTS)关于编辑 etc/apt/sources.list 来修复该问题,我尝试添加以下几行:

deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

这似乎没有帮助。运行后我继续收到类似的错误sudo apt update

我究竟做错了什么?

相关内容