Skip to content

Unable to installl PSGallery on Linux getting message regarding Nuget not being installed but looks like it is.  #643

@AdamSheltz

Description

@AdamSheltz

Unable to install Az module for Powershell.

Error messages:

  1. No repository with the name 'PSGallery' was found.
  2. Unable to find repository 'PSGallery'. Use Get-PSRepository to see all available repositories.

Register the Microsoft RedHat repository

curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo

Install PowerShell

sudo yum install -y powershell

Start PowerShell

pwsh
#######################
FAILURE STARTS HERE
#######################

https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-6.0.0

Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force
PS /software/pkg> Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force
NuGet provider is required to continue
This version of PowerShellGet requires minimum version '2.8.5.201' of NuGet provider to publish an item to NuGet-based repositories. The NuGet provider must be available in '' or ''. You
can also install the NuGet provider by running 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to install and import the NuGet provider
now?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): N
Install-Module: NuGet provider is required to interact with NuGet-based repositories. Please ensure that '2.8.5.201' or newer version of NuGet provider is installed.

get-packageprovider
Name Version DynamicOptions


NuGet 3.0.0.1 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrereleaseVersions, ConfigFile, SkipValidate
PowerShellGet 2.2.5.0 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathUpdate, AllowPrereleaseVersions, Filter, Tag, Incl…

https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-6.0.0
Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions