First, check the brew update upgrade information
brew update –verbose –force
fatal: Needed a single revision
Previously modified the source, resulting in 416, GIT update failed
Reset all sources
Reset brew.git:
cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git
Reset homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core.git
brew update –verbose –force
then
Updating /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask...
fatal: Needed a single revision
need to goto /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask
git pull
From https://github.com/Caskroom/homebrew-cask
* branch HEAD -> FETCH_HEAD
Re-execute brew update to restore normal.
Continue brew search opencv2
to find 2 libraries normally.
brew install opencv@2
Similar Posts:
- [Solved] brew update Error: “fatal: Could not resolve HEAD to a revision”
- How to Solve Error: parent directory is world writable but not sticky
- MAC Install hombrew error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
- chown: /usr/local: Operation not permitted [Solved]
- How to Solve Error Permission denied when running brew cleanup
- Homebrew | curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
- [Solved] Homebrew curl: (60) SSL certificate problem: certificate has expired
- [Solved] Mac Install brew Error: “Warning: /opt/homebrew/bin is not in your PATH.”
- curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
- MAC Install homebrew Error: Failed to connect to raw.githubusercontent.com port 443: Connection refused error: