Reputation: 53
I have be trying to install azure cli in new mac m1. But it fails. I get the following error
brew reinstall azure-cli
==> Downloading https://ghcr.io/v2/homebrew/core/azure-cli/manifests/2.22.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/azure-cli/blobs/sha256:1980c967
==> Downloading from https://pkg-containers-az.githubusercontent.com/ghcr1/blobs
######################################################################## 100.0%
==> Reinstalling azure-cli
==> Pouring azure-cli--2.22.1.arm64_big_sur.bottle.tar.gz
🍺 /opt/homebrew/Cellar/azure-cli/2.22.1: 19,449 files, 329.3MB
After Pouring it just stops. I also tried to install using pip3 and I can install that successfully but when I type "az" command I get the following error
/opt/homebrew/bin/az: line 2: 64784 Killed: 9 AZ_INSTALLER=HOMEBREW /opt/homebrew/Cellar/azure-cli/2.22.1/libexec/bin/python -m azure.cli "$@"
Upvotes: 5
Views: 5678
Reputation: 31
I had some trouble with this too, I took the following steps to install and access the azure cli (I did this on an M1 Mac, OS 13.2.1):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
brew doctor
CMD shift G
and pasted the path here then pressed enter)brew doctor
again and it didn't complain/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
to install homebrew (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/somefolder/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)"
to add homebrew to my PATHwhere python3
to see a list of other Python3 installs on my machine and their interpreter paths, anything installed by Homebrew should include the word homebrew in the path e.g. /opt/homebrew/bin/python3
brew install [email protected]
. I would delete an exisiting version with brew install [email protected]
if it already exisited./opt/homebrew/bin/python3
and select it for the terminal session.brew update && brew install azure-cli
az --help
to ensure the install workedUpvotes: 0
Reputation: 6796
As mentioned in the comments: My python3 wasn't installed via brew. So first uninstalled brew and python3. Then installed brew again(before that made sure Rosetta 2 is working). Then tried brew doctor. There was error saying /usr/... then, I deleted those files. Once successfully removed/deleted brew doctor will run fine.
Upvotes: 3