vscode remote-wsl 启动失败 和设置WSL2失败
vscode remote-wsl 启动失败
错误信息
Updating VS Code Server to version dfd34e8260c270da74b5c2d86d61aee4b6d56977 Removing previous installation... Installing VS Code Server for x64 (dfd34e8260c270da74b5c2d86d61aee4b6d56977) Downloading: 100% /usr/bin/gzip: 1: ELF: not found /usr/bin/gzip: 3: : not found /usr/bin/gzip: 4: Syntax error: "(" unexpected tar: Child returned status 2 tar: Error is not recoverable: exiting now tar is unable to read /home/ls/.vscode-server/bin/dfd34e8260c270da74b5c2d86d61aee4b6d56977-1651148708.tar.gz. Either the file is corrupt or tar has an issue. There's a known WSL issue with tar on Ubuntu 19.10. See workaround in https://github.com/microsoft/vscode-remote-release/issues/1856. Reload the window to initiate a new server download
github里指向的gzip地址已经不存在了,可以访问https://packages.ubuntu.com/找到对应的版本的包。
我用的是:
http://security.ubuntu.com/ubuntu/pool/main/g/gzip/gzip_1.10-0ubuntu4.1_amd64.deb
设置WSL2失败
把wsl --set-default-version 2
变成 wsl.exe --set-version Ubuntu-22.04 2
code runner设置
要把Run In Terminal勾上
如果linux distro没有python这样的命令,要设置code runner中python的值为/usr/bin/python3
本文作者:KiGiBoy
本文链接:https://www.cnblogs.com/ls11736/p/16204527.html
版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步