有关已安装版本,最新版本可用和更新失败的相互冲突信息

发布于 2025-02-01 15:53:28 字数 2331 浏览 3 评论 0原文

我正在Linux上运行Azure CLI。

uname -a
Linux kali 5.15.0-kali3-amd64 #1 SMP Debian 5.15.15-2kali1 (2022-01-31) x86_64 GNU/Linux

运行AZ - Version命令显示我有版本2.36.0已安装并有更新。

az --version                                                                   
azure-cli                         2.36.0 *
 
core                              2.36.0 *
telemetry                          1.0.6
 
Extensions:
azure-devops                      0.24.0
 
Dependencies:
msal                              1.17.0
azure-mgmt-resource               21.0.0
 
Python location '/usr/bin/python3'
Extensions directory '/home/kali/.azure/cliextensions'
Extensions system directory '/usr/lib/python3/dist-packages/azure-cli-extensions'
 
Python (Linux) 3.9.12 (main, Mar 24 2022, 13:02:21) 
[GCC 11.2.0]
 
Legal docs and information: aka.ms/AzureCliLegal
 
 
You have 2 updates available. Consider updating your CLI installation with 'az upgrade'
 
Please let us know how we are doing: https://aka.ms/azureclihats
and let us know if you're interested in trying out our newest features: https://aka.ms/CLIUXstudy

但是,当我运行az升级命令时,它似乎对最新版本(2.37.0,2.36.0-1)的语句有冲突。

az upgrade  
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus                                                                  
Your current Azure CLI version is 2.36.0. Latest version available is 2.37.0.
Please check the release notes first: https://learn.microsoft.com/cli/azure/release-notes-azure-cli                                                                            
Do you want to continue? (Y/n): y
Hit:1 http://kali.download/kali kali-rolling InRelease
Hit:2 https://packages.microsoft.com/repos/azure-cli stretch InRelease
Reading package lists... Done                          
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
azure-cli is already the newest version (2.36.0-1).
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.
CLI upgrade failed or aborted.

两个问题。

  1. 为什么az - version正在显示版本2.36.0安装了AZ升级状态时,我有2.36.0-1
  2. 为什么它无法升级到2.37.0

I am running azure CLI on Linux.

uname -a
Linux kali 5.15.0-kali3-amd64 #1 SMP Debian 5.15.15-2kali1 (2022-01-31) x86_64 GNU/Linux

Running az --version command shows I have version 2.36.0 installed and there are updates available.

az --version                                                                   
azure-cli                         2.36.0 *
 
core                              2.36.0 *
telemetry                          1.0.6
 
Extensions:
azure-devops                      0.24.0
 
Dependencies:
msal                              1.17.0
azure-mgmt-resource               21.0.0
 
Python location '/usr/bin/python3'
Extensions directory '/home/kali/.azure/cliextensions'
Extensions system directory '/usr/lib/python3/dist-packages/azure-cli-extensions'
 
Python (Linux) 3.9.12 (main, Mar 24 2022, 13:02:21) 
[GCC 11.2.0]
 
Legal docs and information: aka.ms/AzureCliLegal
 
 
You have 2 updates available. Consider updating your CLI installation with 'az upgrade'
 
Please let us know how we are doing: https://aka.ms/azureclihats
and let us know if you're interested in trying out our newest features: https://aka.ms/CLIUXstudy

However, when I run the az upgrade command, it seems to have conflicting statements about what's the latest version (2.37.0, 2.36.0-1).

az upgrade  
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus                                                                  
Your current Azure CLI version is 2.36.0. Latest version available is 2.37.0.
Please check the release notes first: https://learn.microsoft.com/cli/azure/release-notes-azure-cli                                                                            
Do you want to continue? (Y/n): y
Hit:1 http://kali.download/kali kali-rolling InRelease
Hit:2 https://packages.microsoft.com/repos/azure-cli stretch InRelease
Reading package lists... Done                          
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
azure-cli is already the newest version (2.36.0-1).
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.
CLI upgrade failed or aborted.

Two questions.

  1. Why az --version is showing version 2.36.0 installed while az upgrade states, I have 2.36.0-1?
  2. Why its not able to upgrade to 2.37.0?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

人心善变 2025-02-08 15:53:28
  1. 为什么az - version正在显示版本2.36.0安装了AZ升级状态时,我有2.36.0-1-1?<<< /li>

执行AZ Update命令后,它将重新撤回
Azure-CLI已经是最新版本(2.36.0-1)。 它表明它没有更新为2.37.0版本。

  1. 为什么它无法升级到2.37.0

只要支持安装, az升级 Windows,macOS,上都支持一些Linux分布。它仅允许您 升级到最新版本

如果您使用Azure Cloud Shell执行Azure CLI,则可能已经使用了最新的Azure CLI安装。您必须等待下一个Azure Cloud Shell的构建,除非有一个小错误修复版本的临时发布,否则Azure Cloud Shell 不支持AZ AZ升级。

如果Azure-CLI已经是最新版本,则运行AZ升级将验证和更新所有已安装的扩展名。

为此,您可以使用以下解决方法:

AZ升级命令仍处于预览模式。目前,它正在 powershell会话。它在Azure CLI会话中不起作用

在Linux环境中,您必须使用 AZ升级 apt-get升级命令才能更新最新版本。

# using az command
az upgrade
 (or)
# using apt-get command
sudo apt-get update && sudo apt-get upgrade

apt-get升级命令升级您系统的所有安装软件包都没有更改其依赖关系。
使用apt-get install仅升级CLI

。 /update-azure-cli#自动上升“ rel =“ nofollow noreferrer”>自动更新避免这种冲突

参考

  1. az cli update
  2. 使用cloud shell中的az升级命令
  1. Why az --version is showing version 2.36.0 installed while az upgrade states, I have 2.36.0-1?

After executing the az update command it retruns
azure-cli is already the newest version (2.36.0-1). it shows that it is not updating to 2.37.0 version.

  1. Why its not able to upgrade to 2.37.0?

As long as installation is supported, az upgrade is supported on Windows, macOS, and some Linux distributions. It only allows you to upgrade to the most recent version.

If you're using Azure Cloud Shell to execute the Azure CLI, you're probably already utilizing the most recent Azure CLI installation. You must wait for the next build of Azure Cloud Shell unless there is an ad-hoc release of a small bug fix version, as az upgrade is not supported in Azure Cloud Shell.

Running az upgrade will verify and update all installed extensions if azure-cli is already the most recent version.

To achieve this, you can use the below workaround:

The az upgrade command is still in preview mode. currently it is working in PowerShell Session. It's not working in Azure CLI session.

In your Linux Environment either you have to use az upgrade or apt-get upgrade command to update the latest version.

# using az command
az upgrade
 (or)
# using apt-get command
sudo apt-get update && sudo apt-get upgrade

The apt-get upgrade command upgrades all of your system's installed packages that haven't had their dependencies changed.
Use apt-get install to upgrade only the CLI.

OR enable the auto update to avoid this kind of conflicts

Reference

  1. Az cli update
  2. Using Az upgrade command in cloud shell
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文