gpt4 book ai didi

linux - sudo apt update 被 ubuntu 中的 403 错误中断

转载 作者:行者123 更新时间:2023-12-04 19:27:52 27 4
gpt4 key购买 nike

我正在尝试更新我的存储库,但我不断收到来自 docker 的错误,我不知道如何修复它。
错误:

Failed to fetch https://download.docker.com/linux/ubuntu/dists/focal/InRelease  
403 Forbidden [IP: 2600:9000:2251:e800:3:db06:4200:93a1 443]
E: The repository 'https://download.docker.com/linux/ubuntu 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.
我假设我必须手动将 InRelease 文件添加到 docker,但我需要指导,因为我对 ubuntu 完全陌生。

最佳答案

您是否在 official docker installation 之后添加了官方 GPG key ?在ubuntu上?

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
假设您在 x86_64/amd64 系统上,执行:
 echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
我建议您遵循该指南,而不是通过 apt 安装。

关于linux - sudo apt update 被 ubuntu 中的 403 错误中断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69346744/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com