我正在为 docker 环境中的 arm64 机器构建映像。我通过以下方式获取 20.04 基础系统
debootstrap --components=main --arch=arm64 --foreign focal ./mnt http://ports.ubuntu.com/ubuntu-ports
然后输入proot
并发出
debootstrap/debootstrap --second-stage
之后,我可以调整更多内容,然后成功部署映像。我甚至可以安装索引中已有的其他软件包。唯一不起作用的是
apt update
在 内proot
。失败并显示以下错误消息:
root@502827f30e52:/# apt update
Hit:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Err:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Couldn't execute /usr/bin/apt-key to check /var/lib/apt/lists/ports.ubuntu.com_ubuntu-ports_dists_focal_InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://ports.ubuntu.com/ubuntu-ports focal InRelease: Couldn't execute /usr/bin/apt-key to check /var/lib/apt/lists/ports.ubuntu.com_ubuntu-ports_dists_focal_InRelease
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/focal/InRelease Couldn't execute /usr/bin/apt-key to check /var/lib/apt/lists/ports.ubuntu.com_ubuntu-ports_dists_focal_InRelease
W: Some index files failed to download. They have been ignored, or old ones used instead.
我检查了它是否/usr/bin/apt-key
存在,确实,它就在它应该在的地方,而且似乎运行正常。当我想做类似的事情时,它apt-key list
会要求我安装一个附加包gnupg, gnupg2 and gnupg1
。如果我这样做,它似乎运行良好,所以我想这是正常现象?
关于如何查明失败原因apt update
,您有什么想法吗?apt-key