【发布时间】:2022-07-26 06:32:06
【问题描述】:
我最近安装了 wsl 并在终端中运行 code . 我收到此错误:
Updating VS Code Server to version f80445acd5a3dadef24aa209168452a3d97cc326
Removing previous installation...
Installing VS Code Server for x64 (f80445acd5a3dadef24aa209168452a3d97cc326)
Downloading: 100%
Failed
--2022-03-01 20:19:21-- https://update.code.visualstudio.com/commit:f80445acd5a3dadef24aa209168452a3d97cc326/server-linux-x64/stable
Resolving update.code.visualstudio.com (update.code.visualstudio.com)... 40.64.128.224
Connecting to update.code.visualstudio.com (update.code.visualstudio.com)|40.64.128.224|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://az764295.vo.msecnd.net/stable/f80445acd5a3dadef24aa209168452a3d97cc326/vscode-server-linux-x64.tar.gz [following]
--2022-03-01 20:19:25-- https://az764295.vo.msecnd.net/stable/f80445acd5a3dadef24aa209168452a3d97cc326/vscode-server-linux-x64.tar.gz
Resolving az764295.vo.msecnd.net (az764295.vo.msecnd.net)... failed: Temporary failure in name resolution.
wget: unable to resolve host address ‘az764295.vo.msecnd.net’
ERROR: Failed to download https://update.code.visualstudio.com/commit:f80445acd5a3dadef24aa209168452a3d97cc326/server-linux-x64/stable to /home/burbanox/.vscode-server/bin/f80445acd5a3dadef24aa209168452a3d97cc326-1646176740.tar.gz
我需要知道如何解决它才能打开 Visual Studio 代码
【问题讨论】:
-
请澄清您的具体问题或提供其他详细信息以准确突出您的需求。正如目前所写的那样,很难准确地说出你在问什么。
-
别担心,你的问题在编辑之前就已经很清楚了。评论者没有专业知识来理解它是评论的问题(他们应该点击评论上的“跳过”),而不是您的问题.
-
这看起来像是 WSL 中的某种网络故障。如果你
sudo apt update && sudo apt upgrade会发生什么?那样有用吗?如果您尝试从 PowerShell 下载相同的文件,怎么样?Invoke-WebRequest -Uri "https://update.code.visualstudio.com/commit:f80445acd5a3dadef24aa209168452a3d97cc326/server-linux-x64/stable" -OutFile "f80445acd5a3dadef24aa209168452a3d97cc326-1646176740.tar.gz"(当然是你可以写的目录)。 -
您好,谢谢,在
sudo update and upgrade和code .之后出现同样的错误,但在电源外壳中看起来工作正常。 -
您解决了这个问题吗?我也遇到了同样的问题
标签: ubuntu visual-studio-code wsl-2