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

Can't install azure-cli #27

Open
NdagiStanley opened this issue Jul 10, 2023 · 0 comments
Open

Can't install azure-cli #27

NdagiStanley opened this issue Jul 10, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@NdagiStanley
Copy link

Orb version

1.2.2

What happened

Update and install the Azure CLI failed.

View the CircleCI config below from the Usage Examples:

version: '2.1'
orbs:
  azure-cli: circleci/[email protected]
jobs:
  verify-install:
    executor: azure-cli/default
    steps:
      - azure-cli/install
      - run:
          command: az -v
          name: Verify Azure CLI is installed
workflows:
  example-workflow:
    jobs:
      - verify-install

See logs below:

#!/bin/bash -eo pipefail
# Verify the CLI isn't already installed
# Use which instead of command -v for wider coverage of envs

if which az > /dev/null; then
  echo "Azure CLI installed already."
  exit 0
fi

# Set sudo to work whether logged in as root user or non-root user

if [[ $EUID == 0 ]]; then export SUDO=""; else export SUDO="sudo"; fi

# https://github.com/CircleCI-Public/azure-cli-orb/issues/15
# https://manpages.debian.org/unstable/apt/apt-get.8.en.html
$SUDO apt-get --allow-releaseinfo-change-suite update && $SUDO apt-get -qqy install apt-transport-https

if [[ $(command -v lsb_release) == "" ]]; then
  echo "Installing lsb_release"
  $SUDO apt-get -qqy install lsb-release
fi

# Create an environment variable for the correct distribution
export AZ_REPO=$(lsb_release -cs)

# Modify your sources list

echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | \
  $SUDO tee /etc/apt/sources.list.d/azure-cli.list

if [[ $(command -v curl) == "" ]]; then
  echo "Installing curl"
  $SUDO apt-get -qqy install curl
fi

# Get the Microsoft signing key

curl -L https://packages.microsoft.com/keys/microsoft.asc | $SUDO apt-key add -

# Update and install the Azure CLI

# https://github.com/CircleCI-Public/azure-cli-orb/issues/15
# https://manpages.debian.org/unstable/apt/apt-get.8.en.html
$SUDO apt-get --allow-releaseinfo-change-suite update
$SUDO apt-get -qqy install \
  ca-certificates \
  azure-cli
echo "Azure CLI is now installed."

E: Command line option --allow-releaseinfo-change-suite is not understood in combination with the other options
Installing lsb_release
E: Failed to fetch http://deb.debian.org/debian/pool/main/d/distro-info-data/distro-info-data_0.36_all.deb  404  Not Found
E: Failed to fetch http://deb.debian.org/debian/pool/main/l/lsb/lsb-release_9.20161125_all.deb  404  Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Exited with code exit status 100

CircleCI received exit code 100

Expected behavior

It should install azure-cli

@NdagiStanley NdagiStanley added the bug Something isn't working label Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants