Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

bug: Can not install in Windows #234

Closed

Description

@juanjgit

Describe the bug
The install.bat script fails on Windows 11

To Reproduce
Steps to reproduce the behavior:

  1. Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/janhq/nitro/main/install.bat' -OutFile 'install.bat'
  2. .\install.bat
  3. See error:
> 
Removing existing Nitro installation...
latest
Downloading Nitro from: https://github.com/janhq/nitro/releases/download/v0.1.20/nitro-0.1.20-win-amd64.tar.gz
Extracting Nitro...
Expand-Archive : .gz is not a supported archive file format. .zip is the only supported archive file format.
At line:1 char:1
+ Expand-Archive -Path 'C:\Users\JUAN~1.ACE\AppData\Local\Temp\nitro.ta ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (.gz:String) [Expand-Archive], IOException
    + FullyQualifiedErrorId : NotSupportedArchiveFileExtension,Expand-Archive

Expected behavior
Installer should run with no errors and successfully install or at least return an error message with the required minimum powershell version.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 11
  • PowerShell: 5.1

Activity

  1. added
    type: bug
    on Dec 4, 2023
  2. mamadjadali commented on Dec 5, 2023

    @mamadjadali

    consider using PowerShell version 7 or later, as it might have better support for handling different archive formats.

  3. removed their assignment
    on Dec 17, 2023
  4. dlaliberte commented on Dec 18, 2023

    @dlaliberte

    consider using PowerShell version 7 or later, as it might have better support for handling different archive formats.

    I just downloaded PSVersion 7.4, the latest. (Then you have to open "Powershell 7", or you will get the old version.) But it does not come with .gz support. People have created .gz scripts, and perhaps that is what the nitro folks have done.

    I had better luck using the WSL 2 app. You'll have to install jq as well. However, when running nitro, I got an error:
    nitro: error while loading shared libraries: libcudart.so.12: cannot open shared object file: No such file or directory

    So I need to install libcudart.so.12.

  5. mamadjadali commented on Dec 19, 2023

    @mamadjadali

    try installing the CUDA Toolkit 12 libraries alongside the CUDA Toolkit 11 ones,
    sudo apt-get install libcudart.so.12.0
    If this does not work, you can try finding the location of the libcudart.so.12 file using the command sudo find / -name 'libcudart.so.12' and then adding the path to the environment file.

  6. dlaliberte commented on Dec 19, 2023

    @dlaliberte

    Got it working, thanks. Next issue was, as I recall (it was many hours ago lol), the openai api support is not very complete for my needs.

  7. mitosagi commented on Jan 11, 2024

    @mitosagi

    Using tar.exe instead of Expand-Archive worked.

    powershell -Command "& { Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/janhq/nitro/main/install.bat' -OutFile 'install.bat'; (Get-Content .\install.bat) | %{ `$_ -replace 'Expand-Archive -Path','mkdir `"%APPDATA%\nitro`" | tar -zxvf' }  | %{ `$_ -replace 'DestinationPath','C' } | Set-Content .\install.bat; .\install.bat }"
  8. hiro-v commented on Feb 19, 2024

    @hiro-v
    Contributor

    Close this thanks to #373 has been merged
    Thanks @MauroDruwel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions