✘ jinhaiyang ~ brew install node Warning: No remote 'origin' in /opt/homebrew/Library/Taps/homebrew/homebrew-cask, skipping update! Warning: No remote 'origin' in /opt/homebrew/Library/Taps/homebrew/homebrew-core, skipping update! Warning: No remote 'origin' in /opt/homebrew/Library/Taps/homebrew/homebrew-services, skipping update! ==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/brotli-1.0.9.arm64_ ######################################################################## 100.0% ==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/c-ares-1.18.1_1.arm ######################################################################## 100.0% ==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/icu4c-70.1.arm64_mo ######################################################################## 100.0% ==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/libnghttp2-1.47.0.a ######################################################################## 100.0% ==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/libuv-1.44.1_1.arm6 ######################################################################## 100.0% ==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/ca-certificates-202 ######################################################################## 100.0% ==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/openssl%401.1-1.1.1 curl: (22) The requested URL returned error: 404 Warning: Bottle missing, falling back to the default domain... ==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/manifests/1.1.1o ######################################################################## 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/blobs/sha256:d8bb66 ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh ######################################################################## 100.0% ==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/node-18.2.0.arm64_m curl: (22) The requested URL returned error: 404 Warning: Bottle missing, falling back to the default domain... ==> Downloading https://ghcr.io/v2/homebrew/core/node/manifests/18.2.0 ######################################################################## 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/node/blobs/sha256:9316585284696 ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh ######################################################################## 100.0% ==> Installing dependencies for node: brotli, c-ares, icu4c, libnghttp2, libuv, ca-certificates and openssl@1.1 ==> Installing node dependency: brotli fatal: not in a git directory
安装的时候一直报错
由于登陆用户不是HomeBrew的安装用户、所以报以上错误这里解决如下:
1.在当前用户重新安装HomeBrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2.运行brew install node提示成功



