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