sudo apt-get update突然不能使用了,提示:
E: The repository 'http://mirrors.ustc.edu.cn/ubuntu groovy Release' does not have a Release file.
详细信息如下:
sudo apt-get update
Ign:1 http://mirrors.ustc.edu.cn/ubuntu groovy InRelease
Ign:2 http://mirrors.ustc.edu.cn/ubuntu groovy-security InRelease
Err:3 http://mirrors.ustc.edu.cn/ubuntu groovy Release
404 Not Found [IP: 202.141.160.110 80]
Err:4 http://mirrors.ustc.edu.cn/ubuntu groovy-security Release
404 Not Found [IP: 202.141.160.110 80]
Ign:5 http://security.ubuntu.com/ubuntu groovy-security InRelease
Err:6 http://security.ubuntu.com/ubuntu groovy-security Release
404 Not Found [IP: 91.189.91.39 80]
Reading package lists... Done
E: The repository 'http://mirrors.ustc.edu.cn/ubuntu groovy 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.
E: The repository 'http://mirrors.ustc.edu.cn/ubuntu groovy-security 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.
E: The repository 'http://security.ubuntu.com/ubuntu groovy-security Release' no longer has 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.
网上查了很多办法都没有解决。后来才知道,ubuntu20.10不是LTS长期支持版本,因此现在很多镜像网站中已经去掉了对20.10的支持。
但是有些网站还保留着对20.10的支持,比如,中科大的镜像,因此可以使用中科大的镜像地址(上面也是中科大的镜像地址,但是写法不一样,下面的包含:ubuntu-old-releases),修改/etc/apt/sources.list这个文件,将其内容修改为下面的内容就可以了(安全起见,修改之前请先备份):
# 默认注释了源码仓库,如有需要可自行取消注释
deb http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ groovy main restricted universe multiverse
# deb-src http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ groovy-security main restricted universe multiverse
# deb-src http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ groovy-updates main restricted universe multiverse
# deb-src http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ groovy-backports main restricted universe multiverse
# deb-src http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ focal-backports main restricted universe multiverse