我更新了源,也添加了DNS,但还是无法进行update,代码如下:
(base) ruoruo@DESKTOP-5SC16P5:/etc/network$ sudo cat /etc/resolv.conf
This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
[network]
generateResolvConf = false
nameserver 8.8.8.8
nameserver 8.8.4.4
(base) ruoruo@DESKTOP-5SC16P5:/etc/network$ sudo apt-get update
Err:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal InRelease
Temporary failure resolving 'mirrors.tuna.tsinghua.edu.cn'
Err:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates InRelease
Temporary failure resolving 'mirrors.tuna.tsinghua.edu.cn'
Err:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports InRelease
Temporary failure resolving 'mirrors.tuna.tsinghua.edu.cn'
Err:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security InRelease
Temporary failure resolving 'mirrors.tuna.tsinghua.edu.cn'
Reading package lists... Done
W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/focal/InRelease Temporary failure resolving 'mirrors.tuna.tsinghua.edu.cn'
W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/focal-updates/InRelease Temporary failure resolving 'mirrors.tuna.tsinghua.edu.cn'
W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/focal-backports/InRelease Temporary failure resolving 'mirrors.tuna.tsinghua.edu.cn'
W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/focal-security/InRelease Temporary failure resolving 'mirrors.tuna.tsinghua.edu.cn'
W: Some index files failed to download. They have been ignored, or old ones used instead.
(base) ruoruo@DESKTOP-5SC16P5:/etc/network$