I am trying to repair Homebrew.
I recently tried to reinstall it but when I typed "brew doctor"
My output was:
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
The current working directory doesn't exist, cannot proceed.
I have tried to re-install it by typing this into the command line again:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
But my output is:
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
How can I fix my Homebrew install?
rm
command or we can vote up / promote this with edits. Also - you could ask - how can I tell if SIP is affecting a specific task. that is answerable and seems a little past the scope of this question so I've be happy to answer that for you elsewhere. The answer is almost surely "no" in homebrew's case.