skip to Main Content

When I open Ubuntu in a PowerShell or Windows terminal and type "code", it just says updating and then failed:

code

Output:

Updating VS Code Server to version a6606b6ca720bca780c2d3c9d4cc3966ff2eca12
Removing previous installation...
Installing VS Code Server for x64 (a6606b6ca720bca780c2d3c9d4cc3966ff2eca12)
Downloading: 100%
Failed
--2024-03-08 14:30:17--  https://update.code.visualstudio.com/commit:a6606b6ca720bca780c2d3c9d4cc3966ff2eca12/server-linux-x64/stable
Resolving update.code.visualstudio.com (update.code.visualstudio.com)... 13.107.246.55, 13.107.213.55, 2620:1ec:bdf::55, ...
Connecting to update.code.visualstudio.com (update.code.visualstudio.com)|13.107.246.55|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-03-08 14:30:18 ERROR 404: Not Found.

ERROR: Failed to download https://update.code.visualstudio.com/commit:a6606b6ca720bca780c2d3c9d4cc3966ff2eca12/server-linux-x64/stable to /home/adduser/.vscode-server/bin/a6606b6ca720bca780c2d3c9d4cc3966ff2eca12-1709901016.tar.gz

I was trying to install Visual Studio Code on my WSL 2, because I was informed by the Odin Project that they don’t really support Windows as an operating system. So I installed WSL and Ubuntu, but I can’t install Visual Studio Code on my WSL (I have a Visual Studio Code installation on Windows already).

2

Answers


  1. Using a web browser, I also tried the download URL that the error message provided on your system and I received a 404 "Not found" on that file.

    You aren’t the first person to have experienced this particular problem, apparently. Issue #9214 on the vscode-remote-server shows the same commit hash failing to download.

    The response from a Microsoft Developer for VSCode there was:

    a6606b6ca720bca780c2d3c9d4cc3966ff2eca12 is not the official release build- seems like you might have ended up on a private build somehow? You are also on an out of date version, so updating or uninstall/reinstall should fix it

    Uninstall VSCode itself, download the installer from Microsoft directly, and reinstall.

    As mentioned in the comments, if there’s a ~/.vscode-server in your Linux home directory, then I would delete or rename it as well for good measure.

    Login or Signup to reply.
  2. It’s messy but quick fix (for now); running "rm -r ~/.vscode-server/" worked for me even though the delete fails because the extensions folder in .vscode-server is not empty.

    If this issue happens to me again, I’ll rather go inside that dir and work out what specifically to delete so that it’s a cleaner solution and update this answer.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search