Skip to content

Install Azure CLI on Debian 13 - missing trixie directory #32069

Description

@Trikenstein

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

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

Activity

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

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions