无法在 WSL 中更新 VSCode

问题描述 投票:0回答:1

到目前为止,我一直在 WSL 中使用 VSCode,没有任何问题。截至今天,我收到以下错误

Updating VS Code Server to version 441438abd1ac652551dbe4d408dfcec8a499b8bf
Removing previous installation...
Installing VS Code Server for x64 (441438abd1ac652551dbe4d408dfcec8a499b8bf)
Downloading: 100%
Failed
--2023-02-13 16:23:45--  https://update.code.visualstudio.com /commit:441438abd1ac652551dbe4d408dfcec8a499b8bf/server-linux-x64/stable
Resolving update.code.visualstudio.com (update.code.visualstudio.com)... failed: Name or service not known.
wget: unable to resolve host address ‘update.code.visualstudio.com’
ERROR: Failed to download https://update.code.visualstudio.com   /commit:441438abd1ac652551dbe4d408dfcec8a499b8bf/server-linux-x64/stable to /home/tim/.vscode-server/bin/441438abd1ac652551dbe4d408dfcec8a499b8bf-1676301825.tar.gz

似乎我无法再从 WSL 中解决

update.code.visualstudio.com

ping update.code.visualstudio.com
ping: update.code.visualstudio.com: Name or service not known

nslookup
显示以下输出:

nslookup update.code.visualstudio.com
Server:         172.31.96.1
Address:        172.31.96.1#53

Non-authoritative answer:
update.code.visualstudio.com    canonical name = vscode-update.trafficmanager.net.
vscode-update.trafficmanager.net        canonical name = vscode-update-weu.azurewebsites.net.
vscode-update-weu.azurewebsites.net     canonical name = waws-prod-am2-193.sip.azurewebsites.windows.net.
waws-prod-am2-193.sip.azurewebsites.windows.net canonical name = waws-prod-am2-193-temp.westeurope.cloudapp.azure.com.
  • 在 Windows 中我可以成功 ping 通
    update.code.visualstudio.com
  • 我已经停止并开始 WSL
  • 我已重新启动系统
  • 没变化,突然更新就不行了
  • 我还没有添加任何代理
visual-studio-code windows-subsystem-for-linux
1个回答
0
投票

我必须暂时禁用我的

ufw
才能让它工作。

sudo ufw disable

VSCode 下载后就好了。

之后重新启用您的 ufw(如果需要)

© www.soinside.com 2019 - 2024. All rights reserved.