コンテンツへスキップ

解決方法

管理者モードでコマンドプロンプトを開き、winsock をリセットすると解決します

1.コマンドプロンプトを右クリックで「管理者として実行」を選択

2.コマンドプロンプトで以下コマンドを入力する

PS C:\WINDOWS\system32> wsl.exe --shutdown
PS C:\WINDOWS\system32> wsl.exe
The attempted operation is not supported for the type of object referenced.
PS C:\WINDOWS\system32> netsh winsock reset

Sucessfully reset the Winsock Catalog.
You must restart the computer in order to complete the reset.

PS C:\WINDOWS\system32> wsl.exe

上記を入力後に、再度、usernameを記入すると解決します。

参考
https://oji-cloud.net/2021/04/20/post-6157/