首页 > 解决方案 > dpkg 在 ubuntu-docker arm64 上安装错误

问题描述

我正在使用 buildx 构建一个 docker 多拱图像。Ubuntu 20.04 是我的基础镜像。我运行RUN apt-get update 然后想安装一些软件包。使用平台 linux/amd64 一切正常。但是,如果平台是 linux/arm64,我的构建会在安装软件包或升级系统时失败,并出现以下错误:

#10 17.35 Get:11 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 procps arm64 2:3.3.16-1ubuntu2.2 [229 kB]
#10 18.05 debconf: delaying package configuration, since apt-utils is not installed
#10 18.19 Fetched 3359 kB in 1s (2687 kB/s)
#10 18.24 Error while loading /usr/sbin/dpkg-split: No such file or directory
#10 18.25 Error while loading /usr/sbin/dpkg-deb: No such file or directory
#10 18.25 dpkg: error processing archive /var/cache/apt/archives/gcc-10-base_10.3.0-1ubuntu1~20.04_arm64.deb (--unpack):
#10 18.25  dpkg-deb --control subprocess returned error exit status 1
#10 18.27 Errors were encountered while processing:
#10 18.27  /var/cache/apt/archives/gcc-10-base_10.3.0-1ubuntu1~20.04_arm64.deb
#10 18.33 E: Sub-process /usr/bin/dpkg returned an error code (1)

标签: dockerubuntuarm64dpkg

解决方案


推荐阅读