Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3.01k forks source link

[Feature Request] Support `apt` installation on Kali Linux #19369

Open jiasli opened 3 years ago

jiasli commented 3 years ago

Kali Linux uses apt as package manager, but it doesn't use Debian or Ubuntu repo.

# cat /etc/os-release
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2021.2"
VERSION_ID="2021.2"
VERSION_CODENAME="kali-rolling"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="https://www.kali.org/"
SUPPORT_URL="https://forums.kali.org/"
BUG_REPORT_URL="https://bugs.kali.org/"

# lsb_release -cs
kali-rolling

# lsb_release -is
Kali

The installation script https://aka.ms/InstallAzureCLIDeb doesn't work with Kali Linux:

https://github.com/Azure/azure-cli/blob/1fec5c4e721d2313e91c15a5ba542025759131d6/scripts/release/debian/deb_install.sh#L57-L71

When apt install azure-cli is run, it installs from Kali repo.

# apt show azure-cli
Package: azure-cli
Version: 2.18.0-2
Priority: optional
Section: python
Maintainer: Debian Python Team <team+python@tracker.debian.org>
Installed-Size: 15.4 kB
Depends: python3:any, python3-azure-cli (>= 2.18.0-2)
Homepage: https://github.com/Azure/azure-cli
Download-Size: 4596 B
APT-Sources: http://http.kali.org/kali kali-last-snapshot/main amd64 Packages
Description: Azure Command-Line Interface (CLI)
 The Azure command-line interface (CLI) is Microsoft's cross-platform
 command-line experience for managing Azure resources. The Azure CLI is designed
 to be easy to learn and get started with, but powerful enough to be a great
 tool for building custom automation to use Azure resources.
 .
 This package provides the az executable and bash completion.

This Azure CLI is not maintained by Microsoft and has various bugs.

jiasli commented 3 years ago

Solution

On Kali Linux, please use pip to install official Azure CLI from PyPI: https://pypi.org/project/azure-cli/

ℹ We recommend installing the latest official pip to avoid unexcepted disruption: https://pip.pypa.io/en/stable/installation/#get-pip-py. Installing pip with apt install python3-pip will install the old pip 20.3.4.

# Install Python
apt update
apt install python3 python3-distutils

# Install official pip
apt install curl
curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py --silent
python3 get-pip.py

# Install official Azure CLI
pip install azure-cli