我正在尝试构建树莓派的Docker镜像,但总是遇到相同的错误,类似于this one、this one和this one。
在以root身份在
我已经尝试了清理apt、清理docker以及删除/重新创建/var/lib/apt/lists等建议的解决方案,但都没有成功。SD卡容量为32G,并进行了全新安装的操作系统。df命令显示有26G可用空间。
以下是一些更多的信息:
- 这个问题发生在一个全新安装的2020-05-27-raspios-buster-lite-armhf系统上的树莓派4B上。 - 同样的错误也发生在另一个运行HypriotOS的树莓派4B上。 - 在安装有Arch Linux的树莓派3B上,同样的命令和镜像可以正常工作。 - 如果使用较旧版本的Ubuntu(如ubuntu:18.04,16.04,14.04),则不会出现此错误。
在以root身份在
arm32v7/ubuntu:20.04
(或者只是ubuntu:latest
)上运行apt update
命令时,我得到以下输出:root@273d63597ce6:/# apt update
Get:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease [265 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [111 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [98.3 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [107 kB]
Err:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
At least one invalid signature was encountered.
Err:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
At least one invalid signature was encountered.
Err:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
At least one invalid signature was encountered.
Err:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
At least one invalid signature was encountered.
Reading package lists... Done
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-security InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
我已经尝试了清理apt、清理docker以及删除/重新创建/var/lib/apt/lists等建议的解决方案,但都没有成功。SD卡容量为32G,并进行了全新安装的操作系统。df命令显示有26G可用空间。
以下是一些更多的信息:
- 这个问题发生在一个全新安装的2020-05-27-raspios-buster-lite-armhf系统上的树莓派4B上。 - 同样的错误也发生在另一个运行HypriotOS的树莓派4B上。 - 在安装有Arch Linux的树莓派3B上,同样的命令和镜像可以正常工作。 - 如果使用较旧版本的Ubuntu(如ubuntu:18.04,16.04,14.04),则不会出现此错误。
docker image rm ubuntu:20.04
和docker system prune -a -f
,但问题没有解决。 - TSparkdocker system prune
命令即可。 - Callum Rogers