I am trying to run brew doctor and I am getting the folowing error
$ brew doctor
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
Already downloaded: /Users/leptos/Library/Caches/Homebrew/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
mkdir: /usr/local/Library/Homebrew/vendor/portable-ruby: Permission denied
/usr/local/Library/Homebrew/brew.sh: line 55: cd: /usr/local/Library/Homebrew/vendor/portable-ruby: No such file or directory
Error: Error: failed to cd to /usr/local/Library/Homebrew/vendor/portable-ruby!
Error: Failed to install vendor Ruby.
Then I try to use:
$ sudo brew doctor
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
I am lost. I have no clue what to do other than reinstalling it.