到目前为止,我一直在 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.
update.code.visualstudio.com
我必须暂时禁用我的
ufw
才能让它工作。
sudo ufw disable
VSCode 下载后就好了。
之后重新启用您的 ufw(如果需要)