Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure CLI no longer installs from documented command on ubuntu linux 21.10. #21532

Closed
jwshive opened this issue Mar 4, 2022 · 13 comments
Closed
Assignees
Labels
Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. Installation Packaging/Debian
Milestone

Comments

@jwshive
Copy link

jwshive commented Mar 4, 2022

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug
When attempting to install azure cli from the instructions here: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt
Running curl -sL https://aka.ms/InstallAzureCLIDeb | bash results in

Package azure-cli is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'azure-cli' has no installation candidate
To Reproduce
curl -sL https://aka.ms/InstallAzureCLIDeb | bash

Expected behavior
azure-cli installs correctly

Environment summary
Installed using single command from document.

Additional context
I am building this on a container image that is using ubuntu:21.10 as the base image.

Step 8/14 : RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
 ---> Running in 9a1f4101597b
Hit:1 https://apt.releases.hashicorp.com/ impish InRelease
Hit:2 http://security.ubuntu.com/ubuntu impish-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu impish InRelease
Hit:4 http://archive.ubuntu.com/ubuntu impish-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu impish-backports InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
curl is already the newest version (7.74.0-1.3ubuntu2).
gnupg is already the newest version (2.2.20-1ubuntu4).
lsb-release is already the newest version (11.1.0ubuntu3).
lsb-release set to manually installed.
The following NEW packages will be installed:
  apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 8 not upgraded.
Need to get 1510 B of archives.
After this operation, 167 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu impish/universe amd64 apt-transport-https all 2.3.9 [1510 B]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 1510 B in 0s (5475 B/s)
Selecting previously unselected package apt-transport-https.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 29358 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_2.3.9_all.deb ...
Unpacking apt-transport-https (2.3.9) ...
Setting up apt-transport-https (2.3.9) ...
Hit:1 https://apt.releases.hashicorp.com/ impish InRelease
Get:2 https://packages.microsoft.com/repos/azure-cli impish InRelease [5816 B]
Hit:3 http://archive.ubuntu.com/ubuntu impish InRelease
Hit:4 http://security.ubuntu.com/ubuntu impish-security InRelease
Hit:5 http://archive.ubuntu.com/ubuntu impish-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu impish-backports InRelease
Fetched 5816 B in 1s (9250 B/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package azure-cli
The command '/bin/sh -c curl -sL https://aka.ms/InstallAzureCLIDeb | bash' returned a non-zero code: 100
2022-03-04T14:04:26.861664471Z stdout P
@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot Installation labels Mar 4, 2022
@ghost ghost assigned jiasli Mar 4, 2022
@ghost ghost added this to the Backlog milestone Mar 4, 2022
@jwshive jwshive changed the title Azure CLI no longer installs from documented command on ubuntu linux. Azure CLI no longer installs from documented command on ubuntu linux 21.10. Mar 4, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Mar 4, 2022

@jiasli for awareness

@jiasli
Copy link
Member

jiasli commented Mar 7, 2022

Currently, we are limited by https://packages.microsoft.com/'s ability to publish a zstd-compressed deb packages, so 21.10 Impish is not yet supported (#21151). Also, based on my previous knowledge, 21.10 Impish is not binary-compatibly with 20.04 Focal.

We are working tightly with https://packages.microsoft.com/ to support zstd compression so that we can support Ubuntu 22.04 Jammy Jellyfish as soon as possible.

Current workarounds:

@jwshive
Copy link
Author

jwshive commented Mar 7, 2022

@jiasli I can probably use the pip work around, but I'm still confused how this did work, but is only broke after the most recent update. We were using this package in our 21.10 container successfully but can no longer. I see the ticket you references is from January so I don't know if I fully understand how something working and is now no longer working relates to a ticket from 2 months ago.

Here's a stripped down gist from 03/02/2022 showing that it did work on 21.10 at that time.
https://gist.github.com/jwshive/638d6fe50307fba94025cff25d95e509

@jiasli
Copy link
Member

jiasli commented Mar 8, 2022

This is because the script https://aka.ms/InstallAzureCLIDeb checks whether impish is in https://packages.microsoft.com/repos/azure-cli/dists/. If not, it falls back to focal.

Previously there is no impish in https://packages.microsoft.com/repos/azure-cli/dists/ so it installs from focal, but now there is, so the script tries to install from https://packages.microsoft.com/repos/azure-cli impish which actually doesn't contain the package.

@hholst80
Copy link

To reiterate. It used to work.

So, please undo the "fix" or preparation to support impish "properly" because we users had no issues with this until it was attempted to be fixed and now its just broken with an external dependency that "microsoft package" ops fixes something in their infra? that sounds like it will take a long time and this broke CI/CD scripts all around the world.

@SudoSpartanDan
Copy link

I can confirm I was using the install script with Ubuntu 21.10 and it was working just fine before this change. I am now having to install a bunch of python dependencies in my Docker image just to get azure-cli to work, bloating my image size. Is there an ETA on fixing this?

@jiasli
Copy link
Member

jiasli commented Mar 16, 2022

We totally understand this situation and we are working tightly with https://packages.microsoft.com/ team. Since Ubuntu 22.04 will be released pretty soon, we will make zstd compression supported as soon as possible.

For now, please use Ubuntu 20.04 LTS to install Azure CLI.

In the meantime, might I recommend the Subscribe button? We will post here if there is any update.

image

@mehcode
Copy link

mehcode commented Mar 22, 2022

Work-around for 21.10 is to run the script, then edit /etc/apt/sources.list.d/azure-cli.list and change impish to focal, then run sudo apt update && sudo apt install azure-cli. I'm sure that could be done in a one-liner with sed or something.

Let's not recommend to thousands of users to downgrade their Ubuntu packaging steps from 21.10 to 20.04 (with the potential to break so many other things in their workflow) when the work-around is so simple (and there was nothing to suggest this wouldn't work before).

@mploschiavo
Copy link

Why should I downgrade, cough - "reinstall" ubuntu? Why is this broken when it used to work?

@SudoSpartanDan
Copy link

Could we get an update on this? It’s been 7 days and the current recommended solution is to… downgrade our OS version… Even though Ubuntu 22.04 is coming soon, I’m not going to be jumping on it with my applications immediately. And I’m definitely not planning to downgrade.

@mehcode
Copy link

mehcode commented Mar 22, 2022

I've spun up 4 VMs (on 21.10) now since I posted that and the work-around mentioned here works great in my setup (mostly using azure container registry from within vm): #21532 (comment)

@jiasli
Copy link
Member

jiasli commented Mar 23, 2022

@mehcode, Impish is not binary compatible with Focal, same as Hirsute is not compatible with Focal (#19367). Using Focal package on Impish is not guaranteed to work.

Good news is that https://packages.microsoft.com/ will support zstd compression next week and we will release Azure CLI 2.35.0 for Impish.

@jiasli
Copy link
Member

jiasli commented Mar 30, 2022

I am glad to announce that https://packages.microsoft.com/ has now support zstd compression and we have successfully published Azure CLI 2.34.1 for Impish:

> docker run -it --rm ubuntu:impish

# apt update

# apt install curl

# curl -sL https://aka.ms/InstallAzureCLIDeb | bash
...
Get:1 https://packages.microsoft.com/repos/azure-cli impish/main amd64 azure-cli all 2.34.1-1~impish [76.4 MB]
...
Preparing to unpack .../azure-cli_2.34.1-1~impish_all.deb ...
Unpacking azure-cli (2.34.1-1~impish) ...
Setting up azure-cli (2.34.1-1~impish) ...

# apt info azure-cli
Package: azure-cli
Version: 2.34.1-1~impish
Priority: extra
Section: python
Maintainer: Azure Python CLI Team <[email protected]>
Installed-Size: 1051 MB
Depends: libc6 (>= 2.34), libssl1.1 (>= 1.1.1)
Homepage: https://github.com/azure/azure-cli
Download-Size: 76.4 MB
APT-Manual-Installed: yes
APT-Sources: https://packages.microsoft.com/repos/azure-cli impish/main amd64 Packages
Description: Azure CLI
 A great cloud needs great tools; we're excited to introduce Azure CLI,
 our next generation multi-platform command line experience for Azure.

Please give it a try and let us know if it works for you. Thanks for your patience and understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. Installation Packaging/Debian
Projects
None yet
Development

No branches or pull requests

7 participants