Skip to content

Install-PSResource fails on fresh installed Ubuntu 22.04 (WSL2) #1811

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

Open
3 tasks done
daxian-dbw opened this issue Mar 31, 2025 · 0 comments
Open
3 tasks done

Install-PSResource fails on fresh installed Ubuntu 22.04 (WSL2) #1811

daxian-dbw opened this issue Mar 31, 2025 · 0 comments
Assignees

Comments

@daxian-dbw
Copy link
Member

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

Steps to reproduce

Install-PSResource fails to install a module on my fresh installed Ubuntu 22.04 (WSL2) but Install-Module works fine. I'm using PowerShell 7.5 and the version of PSResourceGet is 1.1.0. The error message is "Temporary installation path does not exist".

Expected behavior

"Install-PSResource" should work.

Actual behavior

"Install-PSResource" throws the exception.

Error details

PS /home/daxian> Get-Error

Exception             :
    Type    : System.ArgumentException
    Message : Package 'Microsoft.PowerShell.UnixTabCompletion' could not be installed: Temporary installation path does not exist.
    HResult : -2147024809
TargetObject          : Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResource
CategoryInfo          : ObjectNotFound: (Microsoft.PowerShel…s.InstallPSResource:InstallPSResource) [Install-PSResource], ArgumentException
FullyQualifiedErrorId : TempPathNotFound,Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResource
InvocationInfo        :
    MyCommand        : Install-PSResource
    ScriptLineNumber : 1
    OffsetInLine     : 1
    HistoryId        : 13
    Line             : Install-PSResource -Name Microsoft.PowerShell.UnixTabCompletion -Scope CurrentUser
    Statement        : Install-PSResource -Name Microsoft.PowerShell.UnixTabCompletion -Scope CurrentUser
    PositionMessage  : At line:1 char:1
                       + Install-PSResource -Name Microsoft.PowerShell.UnixTabCompletion -Scop …
                       + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    InvocationName   : Install-PSResource
    CommandOrigin    : Internal
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1

Environment data

PowerShell 7.5.
PSResourceGet 1.1.0.

Visuals

Image

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

No branches or pull requests

2 participants