WSL Question

I am trying to compile a .NET Core project into VS Code for the first time. The manual says I have to type wsl on the command line and then install some packages using apt-get. This does not work for me, because apt-get is not found. If I start Ubuntu 20.04 from the start menu I have apt-get and can install everything.


upper picture shows Ubuntu startet from start menu, bottom shows entering “wsl” in cmd

Is the manual outdated? Has something changed?

I ignored it at first but later on during deployment I got an error message like “rsync: command not found”.

So I uninstalled Ubuntu and WSL and installed them according to the instructions again. Now if I press F5 in VSCode I get asked for the device and after selecting it I get:

Error (500) - (2, ‘WaitNamedPipe’, ‘The system cannot find the file specified.’)
Internal server error

Additionally: enable arm emulation for docker fails with: Command ‘Torizon: Enable ARM emulation for docker containers’ resulted in an error (command ‘torizon.enableARMemulation’ not found)

I tried reinstalling “Toradex Torizon Support V1.1.0” and “Early Access” V1.2.46 with no difference.

WSL version:

alt text

Now I’m lost :slight_smile:

Greetings @TriUrs,

I’m not 100% sure what’s happening here with your setup but let’s see if we can figure out. So definitely you want to be using/installing packages in the Ubuntu that that gets launched when you enter wsl via the Windows command prompt. It seems odd though that apt-get isn’t found. Also your command prompt after entering wsl doesn’t seem quite right either.

I don’t believe our extension has anything to do with it as wsl is a completely separate thing. Have you tried other Ubuntu versions or just 20.04? In the Ubuntu that is launched via wsl can you use any Linux commands? (i.e ls, echo, etc.) If I were to assume it seems perhaps something didn’t install quite right with WSL/Ubuntu.

Another approach you could try is maybe try using WSL1 rather than WSL 2.

Best Regards,
Jeremias

Solution found:
The standard distribution was set to Docker.

#wslconfig /l
Windows Subsystem for Linux Distributions:
docker-desktop (Default)
docker-desktop-data
Ubuntu-20.04

Set Ubuntu as default, probably because I uninstalled and reinstalled Ubuntu.
To show this run in Cmd/PowerShell the following command:

wslconfig /s Ubuntu-20.04

List WSL systems again shows now Ubuntu is the default now:

wslconfig /l
Windows Subsystem for Linux Distributions:
Ubuntu-20.04 (default)
docker-desktop
docker-desktop-data

Hi @TriUrs

Perfect that you found the solution. Thanks for the feedback.

Best regards,
Jaski