HypriotOS 的 Raspberry Pi Docker 服务器 GPG 钥匙已过期
首先
我在家中安装了HypriotOS并搭建并运行了Docker基础设施的Raspberry Pi 3 B+。
最近我想更新一下包,所以我尝试运行apt update命令,但遇到了GPG key过期的错误。
这是我当时的记录。
因为这只是备忘录,所以可能存在错误之处,请在参考时予以注意。
发生的事件
很久没有更新树莓派服务器的软件包了(实际上应该定期执行),我打算执行apt update命令进行更新。但是执行完后出现了以下错误。
HypriotOS/armv7: hoge@buri in ~
$ sudo apt update
Get:1 http://archive.raspberrypi.org/debian stretch InRelease [25.4 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease [15.0 kB]
Get:3 https://download.docker.com/linux/raspbian stretch InRelease [31.1 kB]
Get:5 http://archive.raspberrypi.org/debian stretch/main armhf Packages [221 kB]
Get:6 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages [11.7 MB]
Get:4 https://packagecloud.io/Hypriot/rpi/debian stretch InRelease [23.2 kB]
Err:4 https://packagecloud.io/Hypriot/rpi/debian stretch InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 64AEF170D1528977
Fetched 12.0 MB in 28s (416 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
56 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packagecloud.io/Hypriot/rpi/debian stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 64AEF170D1528977
W: Failed to fetch https://packagecloud.io/Hypriot/rpi/debian/dists/stretch/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 64AEF170D1528977
W: Some index files failed to download. They have been ignored, or old ones used instead.
钥匙似乎已过期。
解决方法
我下载了新的钥匙并进行了注册,参考了packagecloud上hypriot的页面。
curl -L https://packagecloud.io/Hypriot/rpi/gpgkey | sudo apt-key add -
我已经成功解决了以上的错误。
最后
由于平时很少使用Debian系,对它并不熟悉,可能有更正确的方法…
暂时用这个修复了,作为备忘录留下来。