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 中国大陆许可协议进行许可。

posted @   单眼皮Boy  阅读(2279)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起