azure - 解析来自 Azure CLI 的 json 结果时出错 : launching Azure CLI: exec: "az": executable file not found in %PATH%

标签 azure terraform command-line-interface

我在运行“terraform plan”时遇到此错误。我通过 CLI 对 Azure 进行了 terraform 身份验证。我已设置帐户订阅。我该如何解决这个问题?

错误:构建 AzureRM 客户端:请确保您已安装 Azure CLI 版本 2.0.79 或更高版本。从 Azure CLI 解析 JSON 结果时出错:启动 Azure CLI:exec:“az”:在 %PATH% 中找不到可执行文件。

最佳答案

错误表明找不到 az。因此,对于这种类型的错误,简单的解决方法是登录到 Azure,如下所示:

az login

enter image description here

然后错误如下:

enter image description here

然后您可以像下面这样检查您的订阅:

 az account list

按照登录步骤,我解决了我的问题。 还要检查您是否使用最新的 Azure Cli 版本。 并尝试以下命令:

az account get-access-token

enter image description here

引用资料来自:

关于azure - 解析来自 Azure CLI 的 json 结果时出错 : launching Azure CLI: exec: "az": executable file not found in %PATH%,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73695639/

相关文章:

amazon-web-services - Terraform 按标签查找 s3 存储桶

angular - 在代理服务器后面的 Windows 上安装 angular-cli

python - 将 .txt 中的行读取到批处理文件中并作为参数传递到命令行?

macos - 我可以检测 Mac OS 上的程序何时使用我的网络摄像头吗?

sql - 从 Azure 中的现有表创建空 SQL 表

php - PHP 应用程序的 Azure webapp 启动脚本

amazon-web-services - 如何在 AWS 上部署基础设施即代码

azure - 屏蔽 Azure 存储库中文件内的数据

c# - Service Fabric 容器 - 无法访问集群内的服务

Azure Policy 拒绝特定角色定义 ID(角色)的角色分配