有关已安装版本,最新版本可用和更新失败的相互冲突信息
我正在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.
两个问题。
- 为什么
az - version
正在显示版本2.36.0
安装了AZ升级状态时,我有2.36.0-1
? - 为什么它无法升级到
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.
- Why
az --version
is showing version2.36.0
installed while az upgrade states, I have2.36.0-1
? - Why its not able to upgrade to
2.37.0
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
执行AZ Update命令后,它将重新撤回
Azure-CLI已经是最新版本(2.36.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升级命令才能更新最新版本。
apt-get升级命令升级您系统的所有安装软件包都没有更改其依赖关系。
使用
apt-get install
仅升级CLI。 /update-azure-cli#自动上升“ rel =“ nofollow noreferrer”>自动更新避免这种冲突
参考
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.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.
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