尝试在 Debian Bullseye 上获取 docker 的更新/当前版本,我得到:
$ sudo apt-get update
...
Ign:14 https://download.docker.com/linux/ubuntu bullseye InRelease
Err:15 https://download.docker.com/linux/ubuntu bullseye Release
404 Not Found [IP: 18.65.229.91 443]
Reading package lists... Done
N: Ignoring file 'docker.list_org' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
E: The repository 'https://download.docker.com/linux/ubuntu bullseye Release' does not have a Release file.
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.
这文章似乎指向了正确的方向,但我找不到任何有用的方法。
我该如何解决这个问题?
更新:检查上述错误的docker存储库,
https://download.docker.com/linux/ubuntu/dists
我看到了许多其他发行版的子目录,但没有找到目标
答案1
答案2
使用存储库在 Linux 中安装 docker 的简单方法:
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
根据docker文档,我不得不$(. /etc/os-release && echo "$VERSION_CODENAME")
用最新的稳定 Debian 版本替换它bookworm