apt-get update 返回错误

apt-get update 返回错误

执行该命令返回:

apt-get update
Hit:1 http://kali.download/kali kali-rolling InRelease              
Ign:2 https://download.docker.com/linux/debian kali-rolling InRelease
Err:3 https://download.docker.com/linux/debian kali-rolling Release
  404  Not Found [IP: 65.9.109.36 443]
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/debian kali-rolling 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.

我的/etc/apt/sources.list

# See https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/
deb http://http.kali.org/kali kali-rolling main contrib non-free

# Additional line for source packages
# deb-src http://http.kali.org/kali kali-rolling main contrib non-free
# deb-src [arch=amd64] https://download.docker.com/linux/debian kali-rolling stable
# deb [arch=amd64] https://download.docker.com/linux/ubuntu ubuntu stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu kali-rolling stable
# deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable

答案1

您可能有一个文件包含/etc/apt/sources.list.d无效的存储库定义。删除该错误就不会再出现。

答案2

E: The repository 'https://download.docker.com/linux/debian kali-rolling Release' does not have a Release file.

Docker 没有kali-rolling.您应该使用 debian 代号。

支持的平台

Debian 衍生品(例如“BunsenLabs Linux”)的用户,“卡利Linux”或“LMDE”(基于 Debian 的 Mint)应遵循 Debian 的安装说明,用其发行版的版本替换相应的 Debian 发行版。请参阅您的发行版的文档,查找与您的衍生版本相对应的 Debian 版本

在 Debian 上安装 Docker 引擎

echo "deb [arch=amd64] https://download.docker.com/linux/debian buster stable" | \
sudo tee /etc/apt/sources.list.d/docker-ce.list

正如斯蒂芬所说,删除下面的文件/etc/apt/sources.list.d 这是错误的根本原因。

相关内容