我们可以使用以下命令在Linux上安装azure cli:
curl -L https://aka.ms/InstallAzureCli | bash的
但是,如果我们想要安装特定版本的azure cli,那么说版本2.0.23就像2.0.24有一些问题
请帮助!
答案 0 :(得分:0)
我们可以使用 RPM包来安装它。
我们可以找到发布here:
将其下载到您的Linux,然后使用rpm
命令进行安装。
<强>更新强>:
感谢Anil Kumar P分享,我们可以使用此命令安装Azure CLI:
yum install azure-cli-2.0.23-1.el7.x86_64
答案 1 :(得分:0)
还有另一种安装和锁定CLI版本的方法。假设您要在Ubuntu 16.04上安装2.0.38:
sudo apt-get install -y azure-cli=2.0.38-1~xenial
echo azure-cli hold | sudo dpkg --set-selection
sudo apt-get upgrade -y
答案 2 :(得分:0)
如果要获取不同发行版的完整版本列表,请访问:https://packages.microsoft.com/repos/azure-cli/dists/
例如Ubuntu的Azure CLI版本 https://packages.microsoft.com/repos/azure-cli/dists/xenial/main/binary-amd64/Packages
Package: azure-cli
Priority: extra
Section: python
Installed-Size: 317827
Maintainer: Azure Python CLI Team <azpycli@microsoft.com>
Architecture: all
Version: 2.0.41-1~xenial
Depends: libc6 (>= 2.17), libssl1.0.0 (>= 1.0.2~beta3)
Filename: pool/main/a/azure-cli/azure-cli_2.0.41-1~xenial_all.deb
Size: 40889424
MD5sum: cc807f4010b6af9507d74ef5404ee09c
SHA1: f593bffa3731a3a670b927723ca97071b0166471
SHA256: 5cfa52a187ac7d028c663f16c4bfea7ac7e49e5917cf90fe3a0299eaa496a194
SHA512: 384bf978379616522405d9e3e25645243c8c8529cd675c7bd036b8817f9220c2cdf3c1a6c3660f23f5775eeffab740608d678c5508b6aeca0359fc4370f84c74
Description: Azure CLI 2.0
A great cloud needs great tools; we're excited to introduce Azure CLI 2.0,
our next generation multi-platform command line experience for Azure.
Homepage: https://github.com/azure/azure-cli
Package: azure-cli
Priority: extra
Section: python
Installed-Size: 314381
Maintainer: Azure Python CLI Team <azpycli@microsoft.com>
Architecture: all
**Version: 2.0.38-1~xenial**
Depends: libc6 (>= 2.17), libssl1.0.0 (>= 1.0.2~beta3)
Filename: pool/main/a/azure-cli/azure-cli_2.0.38-1~xenial_all.deb
Size: 40504494
MD5sum: 7f076d5a7cbc38ab02913c73b2f2c372
SHA1: 10e1460570c72a1a28908c0ed73520e5ccd43a99
SHA256: c127e448b21c746c7bb67e8ab5074802458aaeb84516f746c25463fa20f45b1b
SHA512: 0969e2260ee48401df3796c26b682a8fb39b1a5d7bf5f7c9613a102dfcf3052d362cf93664317f8f4e035efa673c77316009d15d76ef8b378b829cec43f1836f
Description: Azure CLI 2.0
A great cloud needs great tools; we're excited to introduce Azure CLI 2.0,
our next generation multi-platform command line experience for Azure.
Homepage: https://github.com/azure/azure-cli