Windows 10 更新後 WSL 不起作用

Windows 10 更新後 WSL 不起作用

我已加入 Windows 10 Insider Preview。今天系統更新到版本2004 build 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 在該版本上工作沒有問題。

相關內容