我一直在尝试在新的 mac m1 中安装 azure cli。但它失败了。我收到以下错误
const BigArray = [[1,2,3,"Foo"],[4,5,6,"Bar"], [1,2,3,"Baz"]];
let i;
let index = -1;
for(i = 0; i < BigArray.length; i++) {
if(BigArray[i].includes('Foo')) {
index = i;
}
}
浇注后它就停止了。我也尝试使用 pip3 安装,我可以成功安装,但是当我输入“az”命令时,出现以下错误
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
答案 0 :(得分:2)
正如评论中提到的:我的 python3 不是通过 brew 安装的。所以先卸载了brew和python3。然后再次安装 brew(在此之前确保 Rosetta 2 正常工作)。然后尝试酿造医生。有错误说 /usr/... 然后,我删除了这些文件。成功移除/删除 brew doctor 后将正常运行。