macbook pro (M1) + install brew + brew install cloudfoundry

 解决办法:

// 安装 homebrew
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"


// brew 安装 cf
arch -x86_64 /usr/local/Homebrew/bin/brew install cloudfoundry/tap/cf-cli@8

.

.

.

.

如果:

先安装brew 

然后再用brew安装cf 

brew install cloudfoundry/tap/cf-cli@8

那么就会:

当前 (2022-03-25), 在 macbook pro (m1) 上 会出现如下error

cf-cli: The x86_64 architecture is required for this software.
Error: An unsatisfied requirement failed this build.

.

.

.

.

.

过程:

网上关于brew install, 几乎都是如下安装

The Missing Package Manager for macOS (or Linux) — Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

 然而,这种方式安装的brew,在macbook pro (m1) 上使用brew 无法成功安装 cloudfoundry

除了上述错误提示,有时候 执行 brew install  cloudfoundry/tap/cf-cli@8 会弹出一个 tips让用如下方式安装:Installation — Homebrew Documentation

macbook pro (M1) + install brew + brew install cloudfoundry_第1张图片

然而并没有什么用....

直到再github上找到的一个同样问题的issue

https://github.com/cloudfoundry/cli/issues/2131https://github.com/cloudfoundry/cli/issues/2131macbook pro (M1) + install brew + brew install cloudfoundry_第2张图片

what is Rosetta Shell ?  

继续 google,  终于解决了问题:

macos - How to run the Homebrew installer under Rosetta 2 on M1 Macbook - Stack Overflow

macbook pro (M1) + install brew + brew install cloudfoundry_第3张图片

你可能感兴趣的:(磨刀不误砍柴工,macos)