Cannot update runtime installation when installing Activestate Perl on Windows 10

I’m trying to install version 5.34.0 of Activestate Perl on Windows 10 but I keep getting an error. I had a previous version which I uninstalled but everytime I try to run the command to install the new version I get an error that it tells me that it can’t update the runtime installation. I would have thought that uninstalling the previous version would have uninstalled everything but maybe not? Any help would be appreciated.

Thanks
Bill

===========================================================
Microsoft Windows [Version 10.0.19043.1415]
(c) Microsoft Corporation. All rights reserved.
C:\Users\Bill>powershell -Command “& $([scriptblock]::Create((New-Object Net.WebClient).DownloadString(‘https://platform.activestate.com/dl/cli/pdli01/install.ps1’))) -activate-default bsublett/Perl” • Preparing Installer for State Tool Package Manager…√ Done

Installing State Tool Package Manager

The State Tool lets you install and manage your language runtimes.

ActiveState collects usage statistics and diagnostic data about failures.
By using the State Tool Package Manager you agree to the terms of ActiveState’s Privacy Policy,
available at: Privacy Policy/Statement - ActiveState

• Downloading State Tool version 0.32.0-SHAc3c2669… :heavy_check_mark: Done
• Installing State Tool to C:\Users\Bill\AppData\Local\ActiveState\StateTool\release… :heavy_check_mark: Done

State Tool Package Manager Installation Complete

State Tool Package Manager has been successfully installed.

Running state activate --default bsublett/Perl

Creating a Virtual Environment for your Project’s Packages

This project will be set as the default, meaning you can use it from anywhere on your system without activating.

Something Went Wrong
────────────────────
x Could not update runtime installation

Need More Help?
───────────────
• Run → state activate --help for general help
• Check the Build Log to find out more: C:\Users\Bill\AppData\Local\Temp\build-log-1161812673
• Ask For Help → State Tool - ActiveState Community
Could not activate bsublett/Perl, error returned: exit status 1
Could not run installer

Hi Bill,

At the point of that error message, the installer has to connect to the internet to download what it needs from your project. Are you behind a proxy server or a firewall? There’s a troubleshooting section in the documentation, and you might need to set some environment variables.

Thanks so much for the response! I’m not behind a proxy server or a firewall but here’s one of the log files that I got from the run. Does this help?

[DEBUG Jan 5 13:27:26.245733600, defaults.go:267] Args: [C:\Users\Bill\AppData\Local\ActiveState\StateTool\release\bin\state-svc.exe start]
[DEBUG Jan 5 13:27:26.249230400, locale.go:38] Init
[DEBUG Jan 5 13:27:26.799988200, errs.go:68] Created error: File could not be found
[DEBUG Jan 5 13:27:26.803592900, errs.go:68] Created error: Not Recognized
[DEBUG Jan 5 13:27:26.822984200, errs.go:68] Created error: Secret not found
[DEBUG Jan 5 13:27:26.822984200, errs.go:68] Created error: Could not save keypair
[DEBUG Jan 5 13:27:26.823489800, errs.go:68] Created error: Build responded with error
[DEBUG Jan 5 13:27:26.823995700, errs.go:68] Created error: Unknown build type
[DEBUG Jan 5 13:27:26.824023100, errors.go:86] Wrapped localized error: – with: The installed version of the State Tool Service does not match that of the client.
Please stop the service with [ACTIONABLE]state-svc stop[/RESET] and try your command again.
If this issue persists please reinstall the State Tool.

[DEBUG Jan 5 13:27:26.824023100, errs.go:68] Created error: no data
[DEBUG Jan 5 13:27:26.824023100, errs.go:68] Created error: member not found
[DEBUG Jan 5 13:27:26.824023100, errs.go:68] Created error: Commit count is unknowable
[DEBUG Jan 5 13:27:26.824023100, errs.go:68] Created error: No merge required
[DEBUG Jan 5 13:27:26.824023100, errs.go:68] Created error: Can’t merge commit thats already in target commits history
[DEBUG Jan 5 13:27:26.824023100, errs.go:68] Created error: Bad expander name
[DEBUG Jan 5 13:27:26.824023100, errs.go:68] Created error: Expander has no handler
[DEBUG Jan 5 13:27:26.825059700, errs.go:68] Created error: Service is already running
[DEBUG Jan 5 13:27:27.182985600, secrets.go:35] Gcloud Secretmanager failed to initialize (ignore if you’re not trying to use gcloud): google: could not find default credentials. See Authenticating as a service account  |  Authentication  |  Google Cloud for more information.
[DEBUG Jan 5 13:27:27.458346200, output.go:53] Requested outputer for
[DEBUG Jan 5 13:27:27.458346200, output.go:58] Using Plain outputer
[DEBUG Jan 5 13:27:27.473046500, termutils.go:17] Cannot get terminal size: The handle is invalid.
[DEBUG Jan 5 13:27:27.473046500, main.go:109] Running CmdStart
[DEBUG Jan 5 13:27:27.474056000, client.go:128] Reporting event to 2 reporters: run-command, state-svc start,
[DEBUG Jan 5 13:27:27.476491400, errs.go:75] Wrapped error: Service is already running – with: valueF failed
[DEBUG Jan 5 13:27:27.476491400, errs.go:75] Wrapped error: valueF failed – with: Could not store pid
[DEBUG Jan 5 13:27:27.476491400, errors.go:113] Wrapped input error: Could not store pid – with: A State Service instance is already running in the background.
[DEBUG Jan 5 13:27:27.476491400, errs.go:75] Wrapped error: A State Service instance is already running in the background. – with: Could not start serviceManager
[DEBUG Jan 5 13:27:27.476491400, client.go:128] Reporting event to 2 reporters: command-exit, state-svc start, 1
[DEBUG Jan 5 13:27:27.696541100, errs.go:75] Wrapped error: – with: Could not start serviceManager: A State Service instance is already running in the background.: Could not store pid: valueF failed: Service is already running
[DEBUG Jan 5 13:27:27.697056900, main.go:61] state-svc errored out due to input: Could not start serviceManager: A State Service instance is already running in the background.: Could not store pid: valueF failed: Service is already running

It looks like the StateTool Service from the previous version was still running when you attempted to uninstall. Since Windows won’t allow files from a running process to be removed, the old service wasn’t uninstalled and is now conflicting when state activate tries to update itself to the latest version.

It probably won’t uninstall cleanly since the rest of that version was removed, so use Windows to stop the running StateTool service (there might be more than one). Then try one of the basic state tool commands, like
state auth
to see if the tool can update if the services have been shut down. If that works, then you can try the state activate
command again.

1 Like