Error installing Install-Module
See original GitHub issueI’m getting an error message running Install-Module to install my Emojis PowerShell module from the PowerShell Gallery. It seems that the -alpha is screwing up the semantic version checking.
- Ubuntu 16.04 LTS Xenial base image (Dockerized)
- PowerShell 6.0.0-alpha
PackageManagement\Install-Package : Could not compare “6.0.0-alpha” to “5.0”. Error: "Cannot convert value “5.0” to typ Installing package ‘Emojis’ e “System.Management.Automation.SemanticVersion”. Error: “Cannot process argument because the value of argument “version” is not valid. Change the value of the “version” argument and run the operation again.”"oooooooooooooooooooooooooooo] At /opt/microsoft/powershell/6.0.0-alpha.8/Modules/PowerShellGet/PSModule.psm1:1706 char:21
- … $null = PackageManagement\Install-Package @PSBoundParameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (Microsoft.Power…InstallPackage:InstallPackage) [Install-Package], Exception
- FullyQualifiedErrorId : ComparisonFailure,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

Cheers, Trevor Sullivan Microsoft MVP: Cloud & Data Center Management https://trevorsullivan.net https://twitter.com/pcgeek86
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (4 by maintainers)

Top Related StackOverflow Question
@pcgeek86
Please use one of the following options to install the modules
Option 1: Replace the PSModule.psm1 file under PowerShellGet module base with the updated file from master branch (https://github.com/PowerShell/PowerShell).
Option 2: Get the latest CI build
Option 3: Use NuGet provider to install the required module to the target location.
@pcgeek86 Currently CI builds are not configured for generating the Ubuntu 16 package. Could you please open an issue for it?
@halr9000 Yes, could you please add this to known issues?