Dan*_*l99 11 windows-10 visual-studio-code windows-subsystem-for-linux wsl-2
目标:在终端中常规使用 Bash 和 Git 来处理 Visual Studio Code 中的 Python 项目。
\n每当我启动时,我都会看到此错误。我无法打开代码或使用终端。
\n\n错误信息:
\nThe editor cannot be opened due to an unexpected error: No file system provider found for resource \'vscode-remote://wsl%2Bubuntu/...\'\nRun Code Online (Sandbox Code Playgroud)\n更新:卸载 WSL。我不再有下面的旧终端输出。
\n终端:
\n[2022-06-13 15:53:18.277] Resolving wsl+ubuntu, resolveAttempt: 1\n[2022-06-13 15:53:18.361] Starting VS Code Server inside WSL (wsl1)\n[2022-06-13 15:53:18.361] Extension version: 0.66.3\n[2022-06-13 15:53:18.361] Windows build: 19044. Multi distro support: available. WSL path support: enabled\n[2022-06-13 15:53:18.361] No shell environment set or found for current distro.\n[2022-06-13 15:53:18.546] WSL daemon log file: \n[2022-06-13 15:53:18.548] Probing if server is already installed: C:\\WINDOWS\\System32\\wsl.exe -d Ubuntu -e sh -c "[ -d ~/.vscode-server/bin/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5 ] && printf found || ([ -f /etc/alpine-release ] && printf alpine-; uname -m)"\n[2022-06-13 15:53:19.023] Probing result: x86_64\n[2022-06-13 15:53:19.024] No server install found in WSL, needs linux-x64\n[2022-06-13 15:53:19.024] Downloading server on client side to C:\\Users\\dabell\\AppData\\Local\\Temp\\vscode-remote-wsl\\c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5\\vscode-server-stable-linux-x64.tar.gz.\n[2022-06-13 15:53:19.024] https://update.code.visualstudio.com/commit:c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/server-linux-x64/stable\n[2022-06-13 15:53:26.719] Unable to download server on client side: Error: Request downloadRequest failed with message: getaddrinfo ENOTFOUND update.code.visualstudio.com. Will try to download on WSL side.\n[2022-06-13 15:53:26.721] Launching C:\\WINDOWS\\System32\\wsl.exe -d Ubuntu sh -c \'"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5 stable code-server .vscode-server --host=127.0.0.1 --port=0 --connection-token=1433349295-3472956524-2784734323-674824766 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all\'\n[2022-06-13 15:53:27.103] Setting up server environment: Looking for /home/danielbellhv/.vscode-server/server-env-setup. Not found.\n[2022-06-13 15:53:27.104] WSL version: 4.4.0-19041-Microsoft Ubuntu\n[2022-06-13 15:53:27.104] Updating VS Code Server to version c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5\n[2022-06-13 15:53:27.104] Removing previous installation...\n[2022-06-13 15:53:27.104] Installing VS Code Server for x64 (c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5)\n[2022-06-13 15:53:27.104] Downloading: \n[2022-06-13 15:53:37.329] 100%\n[2022-06-13 15:53:37.329] Failed\n[2022-06-13 15:53:37.331] --2022-06-13 16:53:37-- https://update.code.visualstudio.com/commit:c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/server-linux-x64/stable\n[2022-06-13 15:53:37.331] Resolving update.code.visualstudio.com (update.code.visualstudio.com)... \n[2022-06-13 15:53:47.093] failed: Temporary failure in name resolution.\n[2022-06-13 15:53:47.093] wget: unable to resolve host address \xe2\x80\x98update.code.visualstudio.com\xe2\x80\x99\n[2022-06-13 15:53:47.093] ERROR: Failed to download https://update.code.visualstudio.com/commit:c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/server-linux-x64/stable to /home/danielbellhv/.vscode-server/bin/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5-1655135606.tar.gz\n[2022-06-13 15:53:47.094] VS Code Server for WSL closed unexpectedly.\n[2022-06-13 15:53:47.094] For help with startup problems, go to https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips\n[2022-06-13 15:53:47.116] WSL Daemon exited with code 0\nRun Code Online (Sandbox Code Playgroud)\n
小智 10
通过重新启动 WSL 容器的网络可以暂时解决此问题。
以管理员身份打开 Powershell 并运行以下命令:
Restart-Service LxssManager
我建议将其保存到脚本中,例如restart-WSL-network.ps1并设置一个快捷方式以在再次发生时运行此脚本。
| 归档时间: |
|
| 查看次数: |
32106 次 |
| 最近记录: |