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 可以在该版本上运行,没有问题。

相关内容