読者です 読者をやめる 読者になる 読者になる

brew update で `/usr/local/Library/ENV/scm/git: No such file or directory` エラー

Development

What?

brew cask updateしたら、gitがないエラーが出る。

$ brew cask update
==> /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
==> /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
==> /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
==> /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
==> /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
==> /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
==> /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
==> /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
==> /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
==> /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
==> /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
==> /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
==> /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
==> Error: update-report should not be called directly!
==> Homebrew has enabled anonymous aggregate user behaviour analytics
Read the analytics documentation (and how to opt-out) here:
  https://git.io/brew-analytics
/usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
/usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
/usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
/usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
/usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
/usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
/usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
/usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
/usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
/usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
/usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
/usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
/usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory
Error: update-report should not be called directly!

Why?

github.com

Solution?

  • cd "$(brew --repository)" && git fetch && git reset --hard origin/master してから、もう一度実行する

参考

discuss.circleci.com

stackoverflow.com