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

Unofficial Azure CLI deb packages are distributed by Linux repositories #19640

Open
jiasli opened this issue Sep 22, 2021 · 18 comments
Open

Unofficial Azure CLI deb packages are distributed by Linux repositories #19640

jiasli opened this issue Sep 22, 2021 · 18 comments

Comments

@jiasli
Copy link
Member

jiasli commented Sep 22, 2021

Community packagers release unofficial Azure CLI deb packages on multiple Linux repositories. These packages are not maintained by Microsoft, outdated, and contain various bugs.

Ubuntu

2.0.81 for Focal 20.04

Package: https://packages.ubuntu.com/source/focal/azure-cli
Issues: https://github.com/Azure/azure-cli/issues?q=is%3Aissue+2.0.81

2.18.0 for Hirsute 21.04

Package: https://packages.ubuntu.com/hirsute/python3-azure-cli
Issues: https://github.com/Azure/azure-cli/issues?q=is%3Aissue+2.18.0

Debian

2.18.0 for Bullseye 11

Package: https://packages.debian.org/bullseye/azure-cli
Issues: https://github.com/Azure/azure-cli/issues?q=is%3Aissue+2.18.0

2.37.0 for sid (unstable)

Package: https://packages.debian.org/sid/azure-cli

How unofficial Azure CLI is installed

Ubuntu 20.04 Focal, Debian 11 Bullseye

The user doesn't follow the Install the Azure CLI on Linux official document to add Microsoft Linux Repo (https://packages.microsoft.com/repos/azure-cli/) to apt. apt install azure-cli will install the above unofficial ones from Debian/Ubuntu repo.

Debian sid

Even though the user added Microsoft Linux Repo (https://packages.microsoft.com/repos/azure-cli/) to apt, apt update fails because we don't release deb package for Debian sid:

# AZ_REPO=$(lsb_release -cs)
# echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | tee /etc/apt/sources.list.d/azure-cli.list
# echo $AZ_REPO
sid
# apt update
Hit:1 http://deb.debian.org/debian sid InRelease
Ign:2 https://packages.microsoft.com/repos/azure-cli sid InRelease
Err:3 https://packages.microsoft.com/repos/azure-cli sid Release
  404  Not Found [IP: 20.188.102.6 443]
Reading package lists... Done
E: The repository 'https://packages.microsoft.com/repos/azure-cli sid Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

apt install azure-cli will install the unofficial 2.37.0.

@ghost ghost added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Sep 22, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Sep 22, 2021
@yonzhan yonzhan added this to the Backlog milestone Sep 22, 2021
@jiasli
Copy link
Member Author

jiasli commented Sep 22, 2021

https://packages.microsoft.com/ is the ONLY source where official Azure CLI packages are distributed.

Install official Azure CLI

To install the latest official Azure CLI, please follow the official document: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt

Uninstall unofficial Azure CLI

If you have already installed the unofficial Azure CLI, you may uninstall it first with

sudo apt remove azure-cli --yes && sudo apt autoremove --yes

In a docker container:

apt remove azure-cli -y && apt autoremove -y

Then install from the official source.

@jiasli jiasli changed the title Unofficial Azure CLI packages are distributed by Linux repositories Unofficial Azure CLI deb packages are distributed by Linux repositories Sep 22, 2021
@orgads
Copy link
Contributor

orgads commented Nov 30, 2021

On debian testing, when I'm using the automated installed (curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash), it still installs the debian package, because it has a newer version (official is 2.30.0-1~buster, while debian is 2.30.0-2).

@orgads
Copy link
Contributor

orgads commented Nov 30, 2021

#20557

@jiasli
Copy link
Member Author

jiasli commented Feb 14, 2022

Azure CLI on Debian sid

@bluca, I noticed that recently you have published azure-cli (2.33.0-2) for Debian sid: https://packages.debian.org/sid/azure-cli

image

This makes it impossible to install official Azure CLI 2.33.0 from https://packages.microsoft.com/repos/azure-cli/

What is the best way to install official Azure CLI from https://packages.microsoft.com/repos/azure-cli/ , instead of Debian's repo?

@jiasli
Copy link
Member Author

jiasli commented Feb 14, 2022

[Outdated] How to tell if the installed Azure CLI is official

An unofficial Azure CLI will show info like this (from #21254):

Linux-5.15.0-3-amd64-x86_64-with-glibc2.33, Debian GNU/Linux bookworm/sid
Python 3.9.10
Installer: DEB

We can tell this is not an Azure CLI deb package released by Microsoft, because the official Azure CLI deb package doesn't bundle Python 3.9.10. Instead, the bundled Python in the official deb package is currently 3.6.10. (We are working on moving to Python 3.8 in #20869.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants