WSL Debianはインターネットに接続できません。

WSL Debianはインターネットに接続できません。

WSL Debianを使用しようとしていますが、インターネットに接続していないようです。などのsudo ping www.google.comコマンドはsudo apt-get update機能しません。

user@USER:~$ sudo ping www.google.com
[sudo] password for user:
ping: www.google.com: Temporary failure in name resolution
user@USER:~$ sudo apt-get update
Err:1 http://deb.debian.org/debian bullseye InRelease
  Temporary failure resolving 'deb.debian.org'
Err:2 http://security.debian.org/debian-security bullseye-security InRelease
  Temporary failure resolving 'security.debian.org'
Err:3 http://ftp.debian.org/debian bullseye-backports InRelease
  Temporary failure resolving 'ftp.debian.org'
Err:4 http://deb.debian.org/debian bullseye-updates InRelease
  Temporary failure resolving 'deb.debian.org'
Reading package lists... Done
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-updates/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/debian-security/dists/bullseye-security/InRelease  Temporary failure resolving 'security.debian.org'
W: Failed to fetch http://ftp.debian.org/debian/dists/bullseye-backports/InRelease  Temporary failure resolving 'ftp.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.

変更テンプレートファイルを見る/etc/resolv.conf このようにしかし、それは他のことをしません。これは Powershell で wsl を呼び出して Ubuntu を開くと一時的に動作しますが、Debian では何もしません。 Powershellでも動作が停止しました。理由がわからない。

/etc/apt/sources.list:

user@USER:~$ cat /etc/apt/sources.list
deb http://deb.debian.org/debian bullseye main
deb http://deb.debian.org/debian bullseye-updates main
deb http://security.debian.org/debian-security bullseye-security main
deb http://ftp.debian.org/debian bullseye-backports main

WSLを再インストールして同じことを試しましたが、残念ながら機能しません。

コンテンツ/etc/resolv.conf:

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

ベストアンサー1

おすすめ記事