Azure / Azure/azure-cli

Install Azure CLI on Debian 13 - missing trixie directory

Open
#32,069 22 comments 26 reactions 1 assignee Assigned to @naga-nandyala View on GitHub
Account act-identity-squad act-observability-squad Auto-Assign Auto-Resolve Azure CLI Team customer-reported feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### 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](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?view=azure-cli-latest&pivots=apt#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](https://aka.ms/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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.