出現圖中所示錯誤的原因是 代理軟件與 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