This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
Install-Module and Update-Module errors / Unable to update PowerShellGet to fix #447
Closed
Description
Steps to reproduce
*The initial issue has been reported in #407, #349 and #7827 where running Install-Module and Update-Module produce errors like below.
The cause of this issue seems to be that the expected URL for the PowerShellGallery is different from the stored repository in that there is a trailing /.
The fix for this issue appears to be to update PowerShellGet to the latest version and this is where I am having an issue.
Update-Module -Name PowerShellGet
Expected behavior
PowerShellGet is updated
Actual behavior
PowerShellGet was not installed by using Install-Module, so it cannot be updated
If I run Install-Module -Name PowerShellGet -Force, I get the same error that happens whenever running Install-Module:
Environment data
This is on Windows Server 2012 R2 that has been upgraded from WMF 4.0 to WMF 5.1.
> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.14409.1005
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14409.1005
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
> Get-Module -ListAvailable PowerShellGet,PackageManagement
ModuleType Version Name
---------- ------- ----
Binary 1.0.0.1 PackageManagement
Script 1.0.0.1 PowerShellGet
> Get-PackageProvider -ListAvailable
msi 3.0.0.0
msu 3.0.0.0
NuGet 2.8.5.208
PowerShellGet 1.0.0.1
Programs 3.0.0.0