Perl 5.36 install error

When I try install windows perl 5.36, got the following error. I appreciate anyone can give the help. Thanks.

Ouhuang,

Welcome to the ActiveState Community! As for the error you’re seeing, I checked your account and found your Perl 5.36 project, which is called “Perl-5.36.0-Windows” as opposed to just “Perl” This may be the root of the error you’re seeing.

To verify, you can try running the following command in a CMD window, which will install and activate your project:
state activate --default ouhuang/Perl-5.36.0-Windows

Alternatively, you can also try running the following command in a CMD window, which install both the most recent State Tool and your project, and then activate your project:
powershell -Command "& $([scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://platform.activestate.com/dl/cli/911674306.1670279101_pdli01/install.ps1')))" -c'state activate --default ouhuang/Perl-5.36.0-Windows'

Let me know if that works for you.

Hi Danac,

Thanks for your help. I tried your way but sill got errors. I deleted Perl-5.36.0-Windows project and generated “Perl” project, then run state activate --default ouhuang/Perl or powershell -Command “& $([scriptblock]::Create((New-Object Net.WebClient).DownloadString(‘https://platform.activestate.com/dl/cli/911674306.1670279101_pdli01/install.ps1’)))” -c’state activate --default ouhuang/Perl, neither works.
Please provide any suggestions or help. I appreciate it.

Both of your examples show a fatal problem when the State Tool attempt to unpack contents to your AppData\Local\activestate\cache folders. Not many things will prevent you from writing to your own AppData tree, but Security Suites can, and if your Desktop has been set up to use Roaming Profiles that can also prevent you from changing your own AppData.

Try disabling your security suite first.

Dear ouhuang,
please try to execute your state commands in a command line with elevated/administrative rights - that should work!
Kind regards
Daniel

Hi All,
I solved the problem by uninstalling state tool and delete its folder and then reinstalling everything. Now Perl 5.36 installed successfully.
My next question is how can I run a perl script file in bash environment.
Previously when strawberry perl installed, the perl script file was automatically set opening with it by default, so I just need run in bash : cmd.exe /c my.pl param1 param2 (param1 and param2 are options for my.pl script).
Now when strawberry perl uninstalled and activestate perl installed, how can I run it like previously?
I appreciate the help from everyone.

Running a Perl script by simply calling the .pl file as if it is executable, instead of calling Perl.exe first, is a workflow which depends on NOT using a virtual environment. It may be easier to change your workflow.

ActivePerl uses a virtual environment if you “activate”. This is intentional, so that you can work without conflicting with a system Perl, other users running Perl, or even other copies of Perl that you wish to try.

Strawberry Perls install only one per system. You can’t have any others, or they conflict.

In order to replicate the old way where there can only be one Perl on a system, you need to make manual changes.

  • Install using “state checkout” instead of “state activate”
  • Manually change how the PATH variable for ActivePerl is set so that is it global instead of User Specific.
  • Manually set up file associations in the registry. If you had Strawberry Perl, the registry associations are likely still set, and can be edited to point at ActivePerl instead. When you set this up, make sure you preserve the variables in the string, or your arguments will not be passed.

Anything you do manually will need to be removed manually if you uninstall.