本文排版不太好,详情可见笔记 有道云笔记
安装wsl2之后,在Ubuntu中更新软件,执行apt-get update命令报错,如下
root@jiangcheng01:~# sudo apt-get update Ign:1 http://mirrors.aliyun.com/ubuntu groovy InRelease Ign:2 http://mirrors.aliyun.com/ubuntu groovy-security InRelease Ign:3 http://mirrors.aliyun.com/ubuntu groovy-updates InRelease Ign:4 http://mirrors.aliyun.com/ubuntu groovy-backports InRelease Err:5 http://mirrors.aliyun.com/ubuntu groovy Release 404 Not Found [IP: 124.239.239.226 80] Err:6 http://mirrors.aliyun.com/ubuntu groovy-security Release 404 Not Found [IP: 124.239.239.226 80] Err:7 http://mirrors.aliyun.com/ubuntu groovy-updates Release 404 Not Found [IP: 124.239.239.226 80] Err:8 http://mirrors.aliyun.com/ubuntu groovy-backports Release 404 Not Found [IP: 124.239.239.226 80] Reading package lists... Done E: The repository 'http://mirrors.aliyun.com/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.aliyun.com/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://mirrors.aliyun.com/ubuntu groovy-updates 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.aliyun.com/ubuntu groovy-backports 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. root@jiangcheng01:~# sudo vim /etc/apt/sources.list root@jiangcheng01:~# sudo apt-get update Ign:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy InRelease Ign:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy-updates InRelease Ign:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy-backports InRelease Ign:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy-security InRelease Err:5 https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy Release 404 Not Found [IP: 101.6.15.130 443] Err:6 https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy-updates Release 404 Not Found [IP: 101.6.15.130 443] Err:7 https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy-backports Release 404 Not Found [IP: 101.6.15.130 443] Err:8 https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy-security Release 404 Not Found [IP: 101.6.15.130 443] Reading package lists... Done E: The repository 'https://mirrors.tuna.tsinghua.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 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy-updates 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 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy-backports 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 'https://mirrors.tuna.tsinghua.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. root@jiangcheng01:~# apt-get update Ign:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy InRelease Ign:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy-updates InRelease Ign:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy-backports InRelease Ign:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy-security InRelease Err:5 https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy Release 404 Not Found [IP: 101.6.15.130 443] Err:6 https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy-updates Release 404 Not Found [IP: 101.6.15.130 443] Err:7 https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy-backports Release 404 Not Found [IP: 101.6.15.130 443] Err:8 https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy-security Release 404 Not Found [IP: 101.6.15.130 443] Reading package lists... Done E: The repository 'https://mirrors.tuna.tsinghua.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 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy-updates 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 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu groovy-backports 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 'https://mirrors.tuna.tsinghua.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. root@jiangcheng01:~# apt-get install xvfb Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package xvfb root@jiangcheng01:~# sudo vim /etc/apt/sources.list root@jiangcheng01:~# apt-get update Ign:1 http://cn.archive.ubuntu.com/ubuntu groovy InRelease Ign:2 http://security.ubuntu.com/ubuntu groovy-security InRelease Ign:3 http://cn.archive.ubuntu.com/ubuntu groovy-security InRelease Ign:4 http://cn.archive.ubuntu.com/ubuntu groovy-updates InRelease Err:5 http://security.ubuntu.com/ubuntu groovy-security Release 404 Not Found [IP: 185.125.190.39 80] Err:6 http://cn.archive.ubuntu.com/ubuntu groovy Release 404 Not Found [IP: 91.189.91.38 80] Err:7 http://cn.archive.ubuntu.com/ubuntu groovy-security Release 404 Not Found [IP: 91.189.91.38 80] Err:8 http://cn.archive.ubuntu.com/ubuntu groovy-updates Release 404 Not Found [IP: 91.189.91.38 80] Reading package lists... Done E: The repository 'http://security.ubuntu.com/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://cn.archive.ubuntu.com/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://cn.archive.ubuntu.com/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://cn.archive.ubuntu.com/ubuntu groovy-updates 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.
替换阿里镜像和清华镜像都不管用,最终替换为中科大镜像成功更新了软件源。