我睡了敖
2022-05-09 16:47
采纳率: 100%
浏览 4.2k
已结题

使用homebrew 的时候失败fatal: not in a git directory Error: Command failed with exit 128: git

使用使用homebrew 的时候失败fatal: not in a git directory Error: Command failed with exit 128: git

 ~  brew install nginx
Warning: No remote 'origin' in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask, skipping update!
Warning: No remote 'origin' in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core, skipping update!
Warning: No remote 'origin' in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services, skipping update!
==> Homebrew has enabled anonymous aggregate formula and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics have been recorded yet (nor will be during this `brew` run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations
Running `brew update --preinstall`...
==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/openssl%401
Already downloaded: /Users/sunkeo/Library/Caches/Homebrew/downloads/fc4281b06e29b8c638b7f3b55da7ab003aef9fcb9f92365ca6f2363d3c07fb40--openssl@1.1-1.1.1o.monterey.bottle.tar.gz
==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/nginx-1.21.
Already downloaded: /Users/sunkeo/Library/Caches/Homebrew/downloads/5582b7ccc9d76be29176ce182ce68534fb57ac5fa81a8a4f179ee6a0d323b4f8--nginx-1.21.6_1.monterey.bottle.tar.gz
==> Installing dependencies for nginx: openssl@1.1
==> Installing nginx dependency: openssl@1.1
fatal: not in a git directory
Error: Command failed with exit 128: git

怎么解决啊 ,自己重新装了好几次还是这样

img

8条回答 默认 最新

相关推荐 更多相似问题