出现图中所示错误的原因是 代理软件与 wsl2 的端口冲突。
方法一(不推荐):
在管理员身份模式下执行 netsh winsock reset ,可以重新启动 WSL2。
此操作会导致代理软件(proxifier)无法使用!
见GitHub讨论:https://github.com/microsoft/WSL/issues/4194#issuecommen
https://github.com/microsoft/WSL/issues/4177#issuecomment-508826708
方法2(推荐):
使用 NoLsp.exe
https://github.com/dyingsu/nolsp
使用管理员身份运行以下命令:
NoLsp.exe C:\Windows\system32\wsl.exe
#通过Nolsp处理下wsl.exe
此后就可正常使用wsl2了。
具体可见讨论:https://github.com/microsoft/WSL/issues/4177#issuecomment-597736482