Issue in installing Torizon WSL2

I am in the process of starting development using Verdin development with AM62 SOM.
I am finding difficulty in installing Torizon WSL2 using Visual Studio Code.

The error log is given below.
Please support.

[12-02 15:13:45.465] Activating Torizon IDE …
[12-02 15:14:00.093] PWHS Scripting enabled
[12-02 15:14:00.344] WSL installed
[12-02 15:14:00.981] Stdout: Windows Subsystem for Linux has no installed distributions.

Use ‘wsl.exe --list --online’ to list available distributions
and ‘wsl.exe --install ’ to install.

Distributions can also be installed by visiting the Microsoft Store:

Error code: Wsl/WSL_E_DEFAULT_DISTRO_NOT_FOUND

[12-02 15:14:00.981] Stderr:
[12-02 15:14:00.981] Error: Command failed: wsl --list --verbose

[12-02 15:14:00.982] Torizon Development Environment for WSL 2 is not installed :: Error code 1
[12-02 15:15:27.730] Stdout:
[12-02 15:15:27.730] Stderr: Remove-Item : A positional parameter cannot be found that accepts argument ‘PC.torizon*.tar’.
At line:1 char:1

  • rm C:\Users\MY PC.torizon*.tar
  •   + CategoryInfo          : InvalidArgument: (:) [Remove-Item], ParameterBindingException
      + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
    
    
    

[12-02 15:15:27.731] Error: Command failed: rm C:\Users\MY PC.torizon*.tar
Remove-Item : A positional parameter cannot be found that accepts argument ‘PC.torizon*.tar’.
At line:1 char:1

  • rm C:\Users\MY PC.torizon*.tar
  •   + CategoryInfo          : InvalidArgument: (:) [Remove-Item], ParameterBindingException
      + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
    
    
    

[12-02 15:15:28.086] Stdout: The system cannot find the file specified.
Error code: Wsl/ERROR_FILE_NOT_FOUND
There is no distribution with the supplied name.
Error code: Wsl/Service/WSL_E_DISTRO_NOT_FOUND

[12-02 15:15:28.086] Stderr: Set-Location : A positional parameter cannot be found that accepts argument ‘PC.torizon’.
At line:1 char:1

  • cd C:\Users\MY PC.torizon ; Move-Item -Path c:\Users\MY PC\AppData\R …
  •   + CategoryInfo          : InvalidArgument: (:) [Set-Location], ParameterBindingException
      + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
    
    

Move-Item : A positional parameter cannot be found that accepts argument ‘PC\AppData\Roaming\Code\User\globalStorage\to
radex.apollox-vscode\file-downloader-downloads\torizon-wsl2.zip\wsl-amd64-0-0-18.img.tar’.
At line:1 char:30

  • … .torizon ; Move-Item -Path c:\Users\MY PC\AppData\Roaming\Code\User\ …
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:slight_smile: [Move-Item], ParameterBindingException
    • FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.MoveItemCommand

[12-02 15:15:28.086] Error: Command failed: cd C:\Users\MY PC.torizon ; Move-Item -Path c:\Users\MY PC\AppData\Roaming\Code\User\globalStorage\toradex.apollox-vscode\file-downloader-downloads\torizon-wsl2.zip\wsl-amd64-0-0-18.img.tar -Destination C:\Users\MY PC.torizon ; wsl --import Torizon . .\wsl-amd64-0-0-18.img.tar --version 2 ; wsl --set-default Torizon
Set-Location : A positional parameter cannot be found that accepts argument ‘PC.torizon’.
At line:1 char:1

  • cd C:\Users\MY PC.torizon ; Move-Item -Path c:\Users\MY PC\AppData\R …
  •   + CategoryInfo          : InvalidArgument: (:) [Set-Location], ParameterBindingException
      + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
    
    

Move-Item : A positional parameter cannot be found that accepts argument ‘PC\AppData\Roaming\Code\User\globalStorage\to
radex.apollox-vscode\file-downloader-downloads\torizon-wsl2.zip\wsl-amd64-0-0-18.img.tar’.
At line:1 char:30

  • … .torizon ; Move-Item -Path c:\Users\MY PC\AppData\Roaming\Code\User\ …
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:slight_smile: [Move-Item], ParameterBindingException
    • FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.MoveItemCommand

[12-02 15:15:28.087] ERROR :: Error trying to install Torizon Development Environment for WSL 2 :: Error code 1

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

I’m sorry to hear you’re having trouble installing Torizon WSL2 with Visual Studio Code. Let’s work through this together.

  1. Install a WSL Distribution:

    • Your error log indicates that no WSL distributions are installed. To resolve this, open a Command Prompt or PowerShell window and execute:
      wsl --install
      
    • This command installs the default Linux distribution, usually Ubuntu. If you prefer a different distribution, list available options with:
      wsl --list --online
      
    • Then, install your chosen distribution using:
      wsl --install -d <DistributionName>
      
    • After installation, ensure the distribution is set to WSL version 2 by running:
      wsl --set-version <DistributionName> 2
      
  2. Correct PowerShell Command Syntax:

    • The errors in your logs suggest issues with file paths containing spaces. In PowerShell, ensure paths with spaces are enclosed in quotes. For example:
      rm "C:\Users\MY PC.torizon*.tar"
      
    • Similarly, for the cd and Move-Item commands, use quotes around paths:
      cd "C:\Users\MY PC.torizon"
      Move-Item -Path "c:\Users\MY PC\AppData\Roaming\Code\User\globalStorage\toradex.apollox-vscode\file-downloader-downloads\torizon-wsl2.zip\wsl-amd64-0-0-18.img.tar" -Destination "C:\Users\MY PC.torizon"
      
  3. Verify Installation:

    • Once the WSL distribution is installed and the PowerShell commands are corrected, try reinstalling the Torizon Development Environment for WSL 2 through Visual Studio Code.
    • Ensure that Visual Studio Code is opened from within the WSL environment to properly connect to the WSL distribution.

By following these steps, you should be able to resolve the installation issues and proceed with your development using Torizon on your Verdin AM62 SOM.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Verdin AM62 SOM - R5F Core init failed.

I completed the first step (installing WSL distribution) .
But I don;t know how to correct power shell command syntax.
I got error again when I tried. The error log is as follows.
Please guide me how to correct power shell command syntax and move forward.

[12-02 16:06:34.333] Activating Torizon IDE …
[12-02 16:06:45.135] PWHS Scripting enabled
[12-02 16:06:45.380] WSL installed
[12-02 16:06:46.330] Stdout:
[12-02 16:06:46.330] Stderr: Remove-Item : Cannot find path ‘C:\Users\Public.torizon’ because it does not exist.
At line:1 char:1

  • Remove-Item -Path ‘c:\Users\Public.torizon’ -Recurse
  •   + CategoryInfo          : ObjectNotFound: (C:\Users\Public\.torizon:String) [Remove-Item], ItemNotFoundException
      + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
    
    
    

[12-02 16:06:46.331] Error: Command failed: Remove-Item -Path ‘c:\Users\Public.torizon’ -Recurse
Remove-Item : Cannot find path ‘C:\Users\Public.torizon’ because it does not exist.
At line:1 char:1

  • Remove-Item -Path ‘c:\Users\Public.torizon’ -Recurse
  •   + CategoryInfo          : ObjectNotFound: (C:\Users\Public\.torizon:String) [Remove-Item], ItemNotFoundException
      + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
    
    
    

[12-02 16:08:11.650] Stdout:
[12-02 16:08:11.650] Stderr: Remove-Item : A positional parameter cannot be found that accepts argument ‘PC.torizon*.tar’.
At line:1 char:1

  • rm C:\Users\MY PC.torizon*.tar
  •   + CategoryInfo          : InvalidArgument: (:) [Remove-Item], ParameterBindingException
      + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
    
    
    

[12-02 16:08:11.651] Error: Command failed: rm C:\Users\MY PC.torizon*.tar
Remove-Item : A positional parameter cannot be found that accepts argument ‘PC.torizon*.tar’.
At line:1 char:1

  • rm C:\Users\MY PC.torizon*.tar
  •   + CategoryInfo          : InvalidArgument: (:) [Remove-Item], ParameterBindingException
      + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
    
    
    

[12-02 16:08:11.998] Stdout: The system cannot find the file specified.
Error code: Wsl/ERROR_FILE_NOT_FOUND
There is no distribution with the supplied name.
Error code: Wsl/Service/WSL_E_DISTRO_NOT_FOUND

[12-02 16:08:11.998] Stderr: Set-Location : A positional parameter cannot be found that accepts argument ‘PC.torizon’.
At line:1 char:1

  • cd C:\Users\MY PC.torizon ; Move-Item -Path c:\Users\MY PC\AppData\R …
  •   + CategoryInfo          : InvalidArgument: (:) [Set-Location], ParameterBindingException
      + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
    
    

Move-Item : A positional parameter cannot be found that accepts argument ‘PC\AppData\Roaming\Code\User\globalStorage\to
radex.apollox-vscode\file-downloader-downloads\torizon-wsl2.zip\wsl-amd64-0-0-18.img.tar’.
At line:1 char:30

  • … .torizon ; Move-Item -Path c:\Users\MY PC\AppData\Roaming\Code\User\ …
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:slight_smile: [Move-Item], ParameterBindingException
    • FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.MoveItemCommand

[12-02 16:08:11.998] Error: Command failed: cd C:\Users\MY PC.torizon ; Move-Item -Path c:\Users\MY PC\AppData\Roaming\Code\User\globalStorage\toradex.apollox-vscode\file-downloader-downloads\torizon-wsl2.zip\wsl-amd64-0-0-18.img.tar -Destination C:\Users\MY PC.torizon ; wsl --import Torizon . .\wsl-amd64-0-0-18.img.tar --version 2 ; wsl --set-default Torizon
Set-Location : A positional parameter cannot be found that accepts argument ‘PC.torizon’.
At line:1 char:1

  • cd C:\Users\MY PC.torizon ; Move-Item -Path c:\Users\MY PC\AppData\R …
  •   + CategoryInfo          : InvalidArgument: (:) [Set-Location], ParameterBindingException
      + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
    
    

Move-Item : A positional parameter cannot be found that accepts argument ‘PC\AppData\Roaming\Code\User\globalStorage\to
radex.apollox-vscode\file-downloader-downloads\torizon-wsl2.zip\wsl-amd64-0-0-18.img.tar’.
At line:1 char:30

  • … .torizon ; Move-Item -Path c:\Users\MY PC\AppData\Roaming\Code\User\ …
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:slight_smile: [Move-Item], ParameterBindingException
    • FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.MoveItemCommand

[12-02 16:08:11.999] ERROR :: Error trying to install Torizon Development Environment for WSL 2 :: Error code 1