E: The repository ... does not have a Release file. N: Updating from such a repository can‘t be done
已解决出错原因解决步骤参考链接出错原因如果遇见如下的报错E: The repository ‘…’ does not have a Release file. N: Updating fromsuch a repository can’t be done securely, and is therefore disabled bydefault.可能是因为旧版的sources.list文件还在你的
·
出错原因
如果遇见如下的报错
E: The repository ‘…’ does not have a Release file. N: Updating from
such a repository can’t be done securely, and is therefore disabled by
default.
可能是因为旧版的sources.list
文件还在你的系统里,需要覆盖掉你的/etc/apt/sources.list
。具体方法如下:
解决步骤
首先sudo -i
然后把下面的代码复制粘贴进去
cat > /etc/apt/sources.list << EOF
deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu xenial-proposed restricted main universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu xenial-proposed restricted main universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
EOF
然后exit
退出root
最后输入
sudo apt clean
sudo apt update
sudo apt dist-upgrade
参考链接
更多推荐
已为社区贡献4条内容
所有评论(0)