$ sudo apt update
Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Temporary failure resolving 'security.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
시스템: 윈도우 10 프로 19044.1415
WSL 2, 우분투 20.04
ping
google.com에도 실패합니다.ping: google.com: Temporary failure in name resolution
이미 마쳤어:
wsl.conf
그 안에 다음 줄이 있습니다.
[network]
generateResolvConf = false
resolv.conf
여러 가지로 다시 생성되었습니다nameserver
.
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 1.1.1.1
시험을 마친:
nameserver 8.8.8.8
에 추가합니다wsl.conf
. 작동하지 않습니다.nameserver
내부에 한 줄을 유지resolv.conf
- 팔로우함그 단계
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow
~에서여기
StackOverflow에서 질문이 대체되었습니다.
답변1
답변2
내 경우에는 이것이 관련성이 있다고 생각했습니다.
https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#no-internet-access-in-wsl
Symantec Network Threat Protection을 종료해야 했습니다.
답변3
아래 명령어를 입력하고 실행해 보세요. 그런 다음 다시 업데이트하세요.
wget --no-check-certificate http.kali.org/kali/pool/main/k/kali-archive-keyring_2022.1_all.deb