sudo apt-get update 抛出错误?

sudo apt-get update 抛出错误?

sudo apt-get update 抛出错误!!

Ubuntu 版本:-

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"
NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

错误:-

Reading package lists... Done
W: The repository 'https://download.docker.com/linux/ubuntu (lsb_release Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://download.docker.com/linux/ubuntu/dists/(lsb_release/-cs)/binary-amd64/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead

如能得到任何帮助我将不胜感激!!

答案1

我通过在 sources.list 中添加条目并评论一些不需要的来源解决了这个问题

sudo add-apt-repository "deb https://apt.dockerproject.org/repo/ $(cat /etc/issue | awk '{print $1}' | tr '[:upper:]' '[:lower:]')-$(lsb_release -cs) main"

之后,它要求我添加缺失的 PUB_KEY

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F76221572C52609D

在这之后,我

sudo apt-get update

问题解决了

相关内容