I am trying to install Homebrew but it’s failing to install. Here are the errors that I am getting:
error: unable to unlink old 'Library/Homebrew/brew.sh': Operation not permitted
fatal: Could not reset index file to revision 'origin/master'.
Failed during: git reset --hard origin/master
When running using sudo I get the below error:
Don't run this as root!
2
Answers
Update: Looks like this might have been some bug in Big sur. There was no folder called as Homebrew or a file called as brew.sh when navigating using terminal or go to. Due to this it was giving this error. But when searched from the finder, the folder was somewhere else.
Please try this