
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
Asked
Viewed
11k times
I was trying to re-install homebrew on my Mac. I used the following command.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
I got the following error. Could someone help me with what to do here?
==> Checking for `sudo` access (which may request your password).
Password:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /usr/sbin/chown -R aryan:admin /usr/local/Homebrew
==> Downloading and installing Homebrew...
HEAD is now at 227445ece Merge pull request #11288 from Homebrew/update-manpage
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!
Failed during: /usr/local/bin/brew update --force --quiet
6
I removed the HomeBrew files by running the following command. After that, I ran the installation as mentioned in the above post. It all worked fine. I was able to install all the packages I need.
# Intel systems
sudo rm -rf /usr/local/homebrew
# M1/M2 system
sudo rm -rf /opt/homebrew
1
@great! # Intel systems
sudo rm -rf /usr/local/homebrew
this works for me.
David Xu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
You must log in to answer this question.
Not the answer you're looking for? Browse other questions tagged macos homebrew .