使用Homebrew安装时报错“'git-lfs' was not found on your path”

587 阅读1分钟

现场复现

通过Homebrew安装dart时,调用brew tap dart-lang/dartbrew install dart 报错

This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.

解决办法

命令行输入git --exec-path

打印出的路径为/usr/local/Cellar/git/2.37.1/libexec/git-core

复制/usr/local/bin/下的git-lfs/usr/local/Cellar/git/2.37.1/libexec/git-core