azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Install Azure CLI on Debian 13 - missing trixie directory

Open Trikenstein opened this issue 1 year ago • 24 comments

Describe the bug

As of 2025-09-05, az CLI version 2.77.0. The documentation Install the Azure CLI on Linux, Option 2: Step-by-step installation instructions has a slight mistake which will install a corrupted az CLI.

# Copy from doc

AZ_DIST=$(lsb_release -cs)
echo "Types: deb
URIs: https://packages.microsoft.com/repos/azure-cli/
Suites: ${AZ_DIST}
Components: main
Architectures: $(dpkg --print-architecture)
Signed-by: /etc/apt/keyrings/microsoft.gpg" | sudo tee /etc/apt/sources.list.d/azure-cli.sources

The reason is because lsb_release -cs gives trixie on Debian13. And https://packages.microsoft.com/repos/azure-cli/dists/ doesn't have any repo named trixie

WORKAROUND

Hardcode Suites: bookworm which is exactly what the InstallAzureCLIDeb does.

PROPOSED SOLUTION

  • Elegant: create trixie directory in https://packages.microsoft.com/repos/azure-cli/dists/. Current Azure documentation remains correct
  • Sloppy: Fix the Azure doc with the hardcoded Suites: bookworm

Related command

Some commands like az login output some warning & error but still functional. However az monitor will squarely FAIL

az monitor metrics alert list --resource-group myResourceGrp --query '[].name' -o tsv

Errors

/usr/lib/python3/dist-packages/azure/cli/core/aaz/_command.py:132: FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in staticmethod() if you want to preserve the old behavior
  if self.AZ_PREVIEW_INFO:
/usr/lib/python3/dist-packages/azure/cli/core/aaz/_command.py:133: FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in staticmethod() if you want to preserve the old behavior
  self.preview_info = self.AZ_PREVIEW_INFO(cli_ctx=self.cli_ctx)
/usr/lib/python3/dist-packages/azure/cli/core/aaz/_command.py:50: FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in staticmethod() if you want to preserve the old behavior
  if self.AZ_PREVIEW_INFO:
/usr/lib/python3/dist-packages/azure/cli/core/aaz/_command.py:51: FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in staticmethod() if you want to preserve the old behavior
  self.group_kwargs['preview_info'] = self.AZ_PREVIEW_INFO(cli_ctx=self.cli_ctx)
ERROR: Error loading command module 'monitor': ord() expected string of length 1, but int found
ERROR: Error loading command module 'rdbms': No module named 'azure.mgmt.rdbms.mysql_flexibleservers'
ERROR: 'monitor' is misspelled or not recognized by the system.

Examples from AI knowledge base:
https://aka.ms/cli_ref$(lsb_release -cs)
Read more about the command in reference docs

Issue script & Debug output

az monitor metrics alert list --resource-group myResourceGrp --query '[].name' -o tsv

Expected behavior

Should display a list of Azure Monitor alert names.

Environment Summary

cat /etc/os-release

PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.0
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

cat /etc/apt/sources.list.d/azure-cli.sources

Types: deb
URIs: https://packages.microsoft.com/repos/azure-cli/
# As of 2025-09-05, trixie suite not available: https://packages.microsoft.com/repos/azure-cli/dists/
#Suites: trixie
Suites: trixie
Components: main
Architectures: amd64
Signed-by: /etc/apt/keyrings/microsoft.gpg

az version

{
"azure-cli": "2.77.0",
"azure-cli-core": "2.77.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {}
}

Additional context

No response

Trikenstein avatar Sep 05 '25 20:09 Trikenstein

Hi @Trikenstein,

This is not the official Azure CLI published by Microsoft.

How to tell if the installed Azure CLI is unofficial:

  • https://github.com/Azure/azure-cli/issues/19640#issuecomment-1133875268
  • https://github.com/Azure/azure-cli/issues/19640#issuecomment-1148202854

Please follow https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux to install Microsoft official Azure CLI.

If you feel that further discussion is needed, please add a comment with the text /clibot unresolve to reopen the issue.

Thank you for opening this issue, we will look into it.

yonzhan avatar Sep 05 '25 20:09 yonzhan

The [azure-client-tools-bot-prd](https://github.com/apps/azure-client-tools-bot-prd) bot has answered

This is not the official Azure CLI published by Microsoft.

How come ?!?!? I landed on this page from the official Azure documentation Install the Azure CLI on Linux, Troubleshooting

Here are some common problems seen when installing with apt. If you experience a problem not covered here, file an issue on GitHub

Trikenstein avatar Sep 05 '25 20:09 Trikenstein

How come this issue had been closed ??? As of 2025-09-08, the documentation Install the Azure CLI on Linux, Option 2: Step-by-step installation instructions is still incorrect. On Debian 13, those instructions will lead to a corrupted install of az CLI which failed on some az commands because of Python 3.13 incompatibilities. I had spent an entire day to troubleshoot and fix my CI/CD pipelines because the docker image was affected by the problem.

Please re-read my initial post which details the error and proposed fix.

Trikenstein avatar Sep 08 '25 15:09 Trikenstein

Hi, this is also showing up in Microsoft supported devcontainers: https://github.com/devcontainers/features/issues/1485

@yonzhan or @jiasli can you please re-open this bug?

bpkroth avatar Sep 22 '25 21:09 bpkroth

Debian 13 is not supported yet.

bebound avatar Sep 23 '25 03:09 bebound

That's fine, but we should keep the ticket open until that's fixed. Thanks!

bpkroth avatar Sep 23 '25 15:09 bpkroth

Any update? Debian 13 "Trixie" was released in August 2025. I'm prevented from building Azure functions locally due to this failing installation.

lordfeck avatar Feb 01 '26 16:02 lordfeck

Any further updates?

maxburke avatar Feb 08 '26 23:02 maxburke

Any update ?

jam-re avatar Mar 20 '26 06:03 jam-re

It would be recommended to support the newest releases of most popular base Docker images. I have tested my Docker image, which installs. DEB package according to the official documentation.

Building on Bookworm ("oldstable") succeeds, building on Trixie yields: E: The repository 'https://packages.microsoft.com/repos/azure-cli trixie Release' does not have a Release file.

Visibly still an issue as of April 2026.

a-matthew avatar Apr 03 '26 18:04 a-matthew

Hi there. Just stumbled upon this, too. Is no one able to fix this?

cquoss avatar Apr 05 '26 12:04 cquoss

Debian 13 has been stable since mid-2025. This isn’t a niche edge case anymore. Please move this off the backlog.

iliaselmatani avatar Apr 05 '26 14:04 iliaselmatani

We are closing in on EOL for Bookworm. What is the issue blocking the release process?

epleterte avatar Apr 09 '26 12:04 epleterte

Debian 13 has been stable since mid-2025. This isn’t a niche edge case anymore. Please move this off the backlog.

I am also running into this issue - Debian Trixie is now being offered as the default in Windows Subsystem for Linux.

Image

scoronado-usn avatar Apr 15 '26 21:04 scoronado-usn

Please consider this update ASAP, as Debian Bookworm is getting outdated and the built-in Debian package for AzureCLI may run into issues depending on the distribution used.

  • https://github.com/Azure/azure-cli/issues/17981 (example of non-official package issues)
  • https://github.com/Azure/azure-cli/issues/26835 (example of non-official package issues)

All the answers state that these packages are not official, so will the official support be provided? Issues like this one clearly highlight there is exactly one official repositories source.

  • Ref.: https://github.com/Azure/azure-cli/issues/19640 (followup on non-official packages)

If maintenance of separate repositories is not considered, then please add a .Deb package (and/or alternatives) to the Releases.

I have yet seen one enterprise project making use of agents other than Linux, hence the .msi installer is not relevant to the majority of use-cases and compiling the package from source in CI/CD pipelines is not acceptable. I could not find a pre-compiled binary under Release, only what seems to be a Python environment with a batch file script. (Github CLI does provide such a binary in comparison).

  • Ref.: https://github.com/Azure/azure-cli/issues/23397 (efforts towards binary package were acknowledged in 2022)
Image



As to the alternative installation routes, the docker image is a non-standard distribution. Azure CLI 2.63.0 (released August 2024) is the final version supported on the Alpine-based Docker image. Microsoft no longer provides updates or bug fixes for this image. To ensure continued support, migrate to the Azure Linux-based image (Azure Linux 3.0)

  • Ref.: https://learn.microsoft.com/en-us/cli/azure/run-azure-cli-docker?view=azure-cli-latest

Azure Linux may not work with all projects, noticeably it uses tdnf, which is not a standard package manager.

  • Ref.: https://github.com/microsoft/azurelinux/issues/12255

Azure Linux is also not uploaded to DockerHub, which offers automatic scanning and presentable vulnerability report. Such report is not offered on the internal registry's panel. The point of enterprise users updating Linux distributions is largely to account for CVEs and future maintenance, so this solution is not acceptable.

  • Ref.: https://mcr.microsoft.com/en-us/artifact/mar/azure-cli/tags

Thank you for trying to make Azure CLI a better tool for everyone 👍

a-matthew avatar Apr 21 '26 14:04 a-matthew

This is a joke from Microsoft, last time it was powershell now it is az cli. Anyone from microslop here?

edit: I am tired of this, deprecating all Microslop functionality on my company servers.

mirek-vl avatar Apr 25 '26 11:04 mirek-vl

Bump, still broken

thorfi avatar May 28 '26 01:05 thorfi

Another month has passed

Droppers avatar Jun 24 '26 07:06 Droppers

Another month has passed

microsoft has no plans of supporting modern platforms, same with new lts ubuntu

mirek-vl avatar Jun 24 '26 16:06 mirek-vl