Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSL Ubuntu 22.04 LTS "$ code ." error tar is unable to read #6704

Closed
flyingkaktus opened this issue May 10, 2022 · 9 comments
Closed

WSL Ubuntu 22.04 LTS "$ code ." error tar is unable to read #6704

flyingkaktus opened this issue May 10, 2022 · 9 comments
Labels
wsl Issue in vscode-remote WSL

Comments

@flyingkaktus
Copy link

Hello, I just installed Ubuntu 22.04 as WSL and wanted to load the VS Code Server according to instructions but I get a strange error message. How can I fix this in a beginner friendly way? The workaround #1856 does not work for me because https://packages.ubuntu.com/disco/amd64/gzip/download does not seem to exist in the year 2022.

  • VSCode Version: 1.67.1
  • Local OS Version: win10
  • Remote OS Version: ubuntu 22.04
  • Remote Extension/Connection Type: WSL
  • Logs:

Updating VS Code Server to version da15b6fd3ef856477bf6f4fb29ba1b7af717770d
Removing previous installation...
Installing VS Code Server for x64 (da15b6fd3ef856477bf6f4fb29ba1b7af717770d)
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/deradmin/.vscode-server/bin/da15b6fd3ef856477bf6f4fb29ba1b7af717770d-1652216065.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 #1856.
Reload the window to initiate a new server download.

Steps to Reproduce:

  1. $ code .

Does this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: Yes

@github-actions github-actions bot added the wsl Issue in vscode-remote WSL label May 10, 2022
@ghost
Copy link

ghost commented May 11, 2022

I am encountering the same issue with Ubuntu 22.04 in similar envirotment as @flyingkaktus described.

@Username-louchi-is-not-available
Copy link

Username-louchi-is-not-available commented May 12, 2022

I have the same problem as @flyingkaktus described.

@mkwia
Copy link

mkwia commented May 13, 2022

I found disco gzip on Launchpad: https://launchpad.net/ubuntu/disco/amd64/gzip/1.9-3

Workaround #1856 worked for me with this download

@flyingkaktus
Copy link
Author

flyingkaktus commented May 13, 2022

for me the error was that my running wsl was version 1, by switching to wsl2 everything works fine.

wsl2 update if missing https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi

you can check your running version in the cmd:

wsl -l -v
wsl --set-default-version 2
wsl --set-version Ubuntu-22.04 2 #will set your Ubuntu 22.04 distribution to use WSL 2

@elieyi
Copy link

elieyi commented May 13, 2022

https://code.visualstudio.com/docs/remote/wsl

FROM VS CODE
Alternatively, you can open a Remote WSL window directly from VS Code:

Start VS Code.
Press F1, select Remote-WSL: New Window for the default distro or Remote-WSL: New Window using Distro for a specific distro.
Use the File menu to open your folder.
If you already have a folder open, you can also use the Remote-WSL: Reopen in WSL command. You will be prompted which distro to use.

If you are in a WSL window and want to open the current input in a local window, use Remote-WSL: Reopen in Windows.

@flyingkaktus
Copy link
Author

@elieyi when the error was not fixed, it did not work via this way either, because on Linux side the server did not operate.

@elieyi
Copy link

elieyi commented May 13, 2022

There was the same issue with Ubuntu 22.04 in a similar environment as @flyingkaktus.
After following the above steps on the windows part after that Ubuntu 22.04 activated automatically on VS Code. After that I wrote that "code ." on the ubuntu side, the problem was fixed.

@thermalogic
Copy link

thermalogic commented May 17, 2022

please ref: microsoft/WSL#8219 (comment)

In gzip 1.10-4ubuntu4 , to change the value at offset 0x189 using

echo -en '\x10' | sudo dd of=/usr/bin/gzip count=1 bs=1 conv=notrunc seek=$((0x189))

The problem was fixed

@jisujit
Copy link

jisujit commented Jun 23, 2022

Thank you thermalogic,
Running the command
echo -en '\x10' | sudo dd of=/usr/bin/gzip count=1 bs=1 conv=notrunc seek=$((0x189))

That fixed my issue

@github-actions github-actions bot locked and limited conversation to collaborators Jun 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wsl Issue in vscode-remote WSL
Projects
None yet
Development

No branches or pull requests

6 participants