条带登录 zsh:找不到命令:stripe

问题描述

我正在关注 stripes docs,当我在第 2 步中转到 stripe login 时,出现以下错误

zsh:找不到命令:stripe

我已经执行了第 1 步,安装了条带 CLI,为什么会出现此错误

更新,更新 2:我执行了推荐的操作,但条带登录仍然不起作用。

我意识到,第 1 步出现以下错误:(检查 update2)

nmaer@nmaer-MBP SignUpFlowFanclub % brew install stripe/stripe-cli/stripe
Error: 
  homebrew-core is a shallow clone.
To `brew update`,first run:
  git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
This command may take a few minutes to run due to the large size of the repository.
This restriction has been made on GitHub's request because updating shallow
clones is an extremely expensive operation due to the tree layout and traffic of
Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you
automatically to avoid repeatedly performing an expensive unshallow operation in
CI systems (which should instead be fixed to not use shallow clones). Sorry for
the inconvenience!
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
==> Installing stripe from stripe/stripe-cli
==> Downloading https://github.com/stripe/stripe-cli/releases/download/v1.5.9/stripe_1.5.9_mac-os_x86_64.tar.gz
Already downloaded: /Users/nmaer/Library/Caches/Homebrew/downloads/afda22020bd67ba6a51e1c4420ec72f009db3462b48c7675b83b1fa0b77928af--stripe_1.5.9_mac-os_x86_64.tar.gz
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Error: Your Command Line Tools (CLT) does not support macOS 11.
It is either outdated or was modified.
Please update your Command Line Tools (CLT) or delete it if no updates are available.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

If that doesn't show you any updates,run:
  sudo rm -rf /Library/Developer/CommandLinetools
  sudo xcode-select --install

Alternatively,manually download them from:
  https://developer.apple.com/download/more/.

Error: An exception occurred within a child process:
  SystemExit: exit

解决方法

我通过运行重新安装了 homebrew

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

然后我再次运行 brew install stripe/stripe-cli/stripe,这次它没有任何问题。