使用勺子更新PWSH?
尝试通过scoop更新PWSH
来更新PowerShell Core时,我会收到以下错误:错误应用程序“ PWSH”仍在运行。关闭所有实例,然后重试。
我尝试关闭PowerShell并通过CMD
进行更新,但仍会引发该错误。
When trying to update Powershell Core with scoop via scoop update pwsh
, I get the following error:ERROR Application "pwsh" is still running. Close all instances and try again.
I tried closing PowerShell and updating via cmd
, but it still throws that error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SCOOP使用
pwsh.exe
执行Scoop运行的PowerShell脚本。 ( scoop 是96%的powershell),即使在cmd.exe
中运行,仍将使用pwsh.exe
执行scoop Update PWSH
所需的脚本。通过使用Windows PowerShell(又称PowerShell 5/PowerShell.exe
)来解决此问题,因此SCOOP将使用该sc执行PowerShell脚本,而不是pwsh
。Scoop uses
pwsh.exe
to execute the PowerShell scripts that scoop runs on. (scoop is 96% PowerShell) Even if run incmd.exe
, it will still usepwsh.exe
to execute the scripts needed toscoop update pwsh
. This problem is solved by using Windows PowerShell, (a.k.a. PowerShell 5 /powershell.exe
) so scoop will execute the PowerShell scripts using that instead ofpwsh
.