Windows 10 アップデート後に WSL が動作しない

Windows 10 アップデート後に WSL が動作しない

Windows 10 Insider Preview に参加しました。今日、システムがバージョン 2004 ビルド 19555.1001 に更新され、WSL を開けなくなりました。

CMD で実行すると次のエラーが表示されます。

Microsoft Windows [Version 10.0.19555.1001]
(c) 2020 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>bash
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

C:\WINDOWS\system32>wsl
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

C:\WINDOWS\system32>ubuntu
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

C:\WINDOWS\system32>

答え1

参照するWSL/問題/4860(@Biswapriyo に感謝)

この問題は次の 3 つの条件で発生します。

  1. システムビルド 19555.1001 (オリジナル版WSL/問題/4860
  2. WSL2 (コメント1コメント2
  3. $Env:Path.length%PATH%) 長すぎる (コメント3

したがって、解決策は 3 つあります。

  1. Win 10 アップデートをロールバックする (コメント4
  2. WSL1に切り替える(コメント2、お勧めしません)
  3. 減らすと$Env:Path.length、私の場合は 2k+ → 1058 で動作します。

将来のビルドで解決されることは明らかですが、ビルド19559についてはさまざまな回答があるようです。このコメントこれは解決されていないと書かれており、その上の @Ramhound のコメントでは、WSL はそのビルドで問題なく動作すると書かれています。

関連情報