【问题标题】:PowerShell executable not found when i'm running flutter commands运行颤振命令时找不到 PowerShell 可执行文件
【发布时间】:2020-11-07 18:57:29
【问题描述】:

运行颤振命令时出现此错误。 错误:找不到 PowerShell 可执行文件。 pwsh.exe 或 PowerShell.exe 必须在您的 PATH 中。

我已尝试安装 Windows Management Framework 5.1 (https://www.microsoft.com/en-us/download/details.aspx?id=54616)

安装 Windows Management Framework 5.1 时出现此错误。 错误:更新不适用于您的计算机。

about my pc

有什么办法吗?

【问题讨论】:

  • 所以......你有没有看过 Flutter 运行时路径中的内容?
  • 是的,并且在环境变量中没有到 powershell 的路径。当我安装 PowerShell-7.0.3-win-x64.msi 时,它会自动创建路径。
  • 您没有提及您正在运行的 Windows 版本。您列出的 ps7 内容适用于 64 位 Windows。但是,任何最新版本的 windows otta 都安装了 ps5.1。
  • 抱歉我更新了帖子。
  • win10 已包含您尝试安装的 WMF 版本。 [grin] 解释了有关该安装尝试的错误。但是,PoSh5.1 应该已经可用。这个目录 >>> `C:\WINDOWS\System32\WindowsPowerShell\v1.0`

标签: android powershell flutter


【解决方案1】:

我尝试安装 Windows Management Framework 5.1,但没有成功。它给了我一个错误-“此更新不适用于您的计算机”,然后我从 GitHub 安装了最新的稳定版本,安装程序自动创建了 PowerShell 路径并解决了我的问题。

https://github.com/PowerShell/PowerShell/releases/

从 Microsoft 商店安装 powershell

【讨论】:

  • 非常感谢
猜你喜欢
  • 1970-01-01
  • 2020-04-28
  • 2020-12-13
  • 2022-08-05
  • 1970-01-01
  • 2019-04-24
  • 2019-03-05
  • 2018-06-18
  • 1970-01-01
相关资源
最近更新 更多