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

Sudden azure-cli installation failure with single-shot script on Ubuntu Trusty: Unable to locate package azure-cli #25393

Closed
bcraun opened this issue Feb 8, 2023 · 6 comments
Assignees
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. Installation question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@bcraun
Copy link

bcraun commented Feb 8, 2023

Describe the bug
Beginning 02/07/2023 Bitbucket pipeline execution fails during attempted installation of azure-cli package. Error is:

E: Unable to locate package azure-cli

The installation method that started failing is:

curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

To Reproduce
Fails with either of the installation options documented by the following methods

Option 1 (single-shot command):
https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt#option-1-install-with-one-command

Option 2 (separate steps):
https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt#option-2-step-by-step-installation-instructions

Expected behavior
azure-cli installs successfully using the single-shot command documented in Option 1

Environment summary
Bitbucket pipeline execution environment which I believe is Ubuntu Trusty within Docker. Same environment that had previously worked until 02/08/2023. Additional details can be provided, if needed.

Additional context
Partial pipeline output from Option 1:

lsb_release -cs
curl -sL https://packages.microsoft.com/repos/azure-cli/dists/
Ign http://archive.ubuntu.com/ trusty InRelease
Hit http://archive.ubuntu.com/ trusty-updates InRelease
Hit http://archive.ubuntu.com/ trusty-security InRelease
Get:1 https://packages.microsoft.com/ trusty InRelease
Hit http://ppa.launchpad.net/ trusty InRelease
Hit http://archive.ubuntu.com/ trusty Release.gpg
Hit http://archive.ubuntu.com/ trusty Release
Hit http://archive.ubuntu.com/ trusty-updates/main Sources
Hit http://archive.ubuntu.com/ trusty-updates/restricted Sources
Hit http://archive.ubuntu.com/ trusty-updates/universe Sources
Hit http://archive.ubuntu.com/ trusty-updates/main amd64 Packages
Hit http://archive.ubuntu.com/ trusty-updates/restricted amd64 Packages
Hit http://archive.ubuntu.com/ trusty-updates/universe amd64 Packages
Hit http://archive.ubuntu.com/ trusty-security/main Sources
Hit http://archive.ubuntu.com/ trusty-security/restricted Sources
Hit http://archive.ubuntu.com/ trusty-security/universe Sources
Hit http://archive.ubuntu.com/ trusty-security/main amd64 Packages
Hit http://archive.ubuntu.com/ trusty-security/restricted amd64 Packages
Hit http://archive.ubuntu.com/ trusty-security/universe amd64 Packages
Get:2 https://packages.microsoft.com/ trusty/main amd64 Packages
Hit http://archive.ubuntu.com/ trusty/main Sources
Hit http://archive.ubuntu.com/ trusty/restricted Sources
Hit http://archive.ubuntu.com/ trusty/universe Sources
Hit http://archive.ubuntu.com/ trusty/main amd64 Packages
Hit http://archive.ubuntu.com/ trusty/restricted amd64 Packages
Hit http://ppa.launchpad.net/ trusty/main amd64 Packages
Hit http://archive.ubuntu.com/ trusty/universe amd64 Packages
Fetched 1902 B in 13s (145 B/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package azure-cli

Partial output from Option 2:

deb [arch=amd64 signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/azure-cli/ trusty main
Hit http://ppa.launchpad.net/ trusty InRelease
Ign http://archive.ubuntu.com/ trusty InRelease
Hit http://archive.ubuntu.com/ trusty-updates InRelease
Hit http://archive.ubuntu.com/ trusty-security InRelease
Get:1 https://packages.microsoft.com/ trusty InRelease
Hit http://archive.ubuntu.com/ trusty Release.gpg
Hit http://archive.ubuntu.com/ trusty Release
Hit http://ppa.launchpad.net/ trusty/main amd64 Packages
Hit http://archive.ubuntu.com/ trusty-updates/main Sources
Hit http://archive.ubuntu.com/ trusty-updates/restricted Sources
Hit http://archive.ubuntu.com/ trusty-updates/universe Sources
Hit http://archive.ubuntu.com/ trusty-updates/main amd64 Packages
Hit http://archive.ubuntu.com/ trusty-updates/restricted amd64 Packages
Hit http://archive.ubuntu.com/ trusty-updates/universe amd64 Packages
Hit http://archive.ubuntu.com/ trusty-security/main Sources
Hit http://archive.ubuntu.com/ trusty-security/restricted Sources
Hit http://archive.ubuntu.com/ trusty-security/universe Sources
Hit http://archive.ubuntu.com/ trusty-security/main amd64 Packages
Hit http://archive.ubuntu.com/ trusty-security/restricted amd64 Packages
Hit http://archive.ubuntu.com/ trusty-security/universe amd64 Packages
Ign https://packages.microsoft.com/ trusty InRelease
Hit http://archive.ubuntu.com/ trusty/main Sources
Get:2 https://packages.microsoft.com/ trusty/main amd64 Packages
Hit http://archive.ubuntu.com/ trusty/restricted Sources
Hit http://archive.ubuntu.com/ trusty/universe Sources
Hit http://archive.ubuntu.com/ trusty/main amd64 Packages
Hit http://archive.ubuntu.com/ trusty/restricted amd64 Packages
Hit http://archive.ubuntu.com/ trusty/universe amd64 Packages
Fetched 1902 B in 11s (167 B/s)
Reading package lists...
W: GPG error: https://packages.microsoft.com/ trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package azure-cli
@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 Feb 8, 2023
@ghost ghost assigned jiasli Feb 8, 2023
@ghost ghost added this to the Backlog milestone Feb 8, 2023
@bcraun
Copy link
Author

bcraun commented Feb 8, 2023

As an additional data point, I tried the one-shot command locally on Ubuntu 20.04 (focal) which was successful so maybe this is specific to trusty.

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 8, 2023

@bebound for awareness

@yonzhan yonzhan added Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 8, 2023
@bebound
Copy link
Contributor

bebound commented Feb 9, 2023

14.04 is EOL long long time ago. We only support 18.04 and newer version. We recommend you to update your OS version. We don't guarantee the script or manual step in the doc works on 14.04.

As a workaround, you change arch=amd64 to arch=all in /etc/apt/sources.list.d/azure-cli.list in option 1.
After doing this, apt update && apt install azure-cli should work again.

@jiasli
Copy link
Member

jiasli commented Feb 9, 2023

As for the one-shot command, I can reproduce.

In ubuntu:trusty, the log shows:

Hit https://packages.microsoft.com trusty InRelease
Hit https://packages.microsoft.com trusty/main amd64 Packages

But in ubuntu:jammy and the log shows:

Get:1 https://packages.microsoft.com/repos/azure-cli jammy InRelease [3029 B]
Get:2 https://packages.microsoft.com/repos/azure-cli jammy/main all Packages [1096 B]

For ubuntu:trusty:

For ubuntu:jammy:

@bcraun
Copy link
Author

bcraun commented Feb 9, 2023

14.04 is EOL long long time ago. We only support 18.04 and newer version. We recommend you to update your OS version. We don't guarantee the script or manual step in the doc works on 14.04.

Understood about upgrading but, unfortunately, it is not within my control. I'm still not understanding why this worked with the same environment until yesterday?

As a workaround, you change arch=amd64 to arch=all in /etc/apt/sources.list.d/azure-cli.list in option 1.
After doing this, apt update && apt install azure-cli should work again.

Option 1 is a one-shot command. How would one change /etc/apt/sources.list.d/azure-cli.list during the automated pipeline execution?

@bcraun
Copy link
Author

bcraun commented Feb 9, 2023

It turns out that Atlassian do provide a way to specify the Ubuntu image to be used in pipelines. I made the change and am now able to install azure-cli. Thanks for the quick responses.

@bcraun bcraun closed this as completed Feb 9, 2023
@jiasli jiasli changed the title Sudden azure-cli installation failure with single-shot script Sudden azure-cli installation failure with single-shot script on Ubuntu Trusty: Unable to locate package azure-cli Feb 13, 2023
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 Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. Installation question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants