I’m attempting to install Active Perl 5.32 under Windows 10 1909.
I copy and paste this command into CMD:
powershell -Command "& $([scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://platform.activestate.com/dl/cli/v30/install-latest.ps1'))) -activate-default ActiveState-Labs/Perl-5.32"
I get this error:
Exception calling "DownloadString" with "1" argument(s): "The underlying connection was closed: An unexpected error
occurred on a send."
At line:1 char:26
+ ... ommand "& $([scriptblock]::Create((New-Object Net.WebClient).Download ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : WebException
& : The term '-activate-default' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:4
+ & -activate-default ActiveState-Labs/Perl-5.32
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (-activate-default:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I feel like I must be missing something simple. Any suggestions?
Thanks.
John
HI @jmorgan-siumed , Thank you for posting here ! The team will have a look and advise accordingly.
Regards.
Hi @jmorgan-siumed ,
Could you share the Powershell version that you have installed? Instructions:
- Open Powershell
- Type or copy-paste the following command:
Get-Host | Select-Object Version
- In the output, you will see the version of PowerShell
- Alternatively, type
$PSVersionTable
and hit the Enter key
- See the
PSVersion
line
The standard version of Powershell that was shipped with version 1909 is missing some of the commandlets that have been added in newer releases.
PSVersion is : 5.1.19041.1682
I am having the exact same issue. Tried first with perl 5.1 and also installed Perl 7.2 to no avail:
PS C:\Program Files\PowerShell\7> powershell -Command “& $([scriptblock]::Create((New-Object Net.WebClient).DownloadString(‘https://platform.activestate.com/dl/cli/298222224.1658219682_pdli01/install.ps1’))) -c’state activate --default jouniaro/Perl-5.34.0-Windows’”
At line:1 char:1
- & # Copyright 2019-2022 ActiveState Software Inc. All rights reserved …
- ~
Missing expression after ‘&’ in pipeline element.
At line:1 char:71
- … # Copyright 2019-2022 ActiveState Software Inc. All rights reserved.
-
~
Unexpected token ’
’ in expression or statement.
At line:20 char:19
The string is missing the terminator: ".
+ CategoryInfo : ParserError: (
, ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingExpression
How can I install it?
Ah, finally I got it. Must run that in ‘cmd.exe’, not in powershell!