2

I am trying to get pygame on my mac and so I am running through a step by step guide, to get the necessary items installed. I have installed brew doctor, but when I try to run the code: sudo brew doctor, I get an error shown below:

apples-MBP-2:~ MaxRothman$ 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.

How can i get around this to carry on! Thanks

Keet Sugathadasa
  • 11,595
  • 6
  • 65
  • 80
Max Rothman
  • 21
  • 1
  • 1
  • 3
  • `Running Homebrew as root is extremely dangerous and no longer supported`.... Seems self explanatory – OneCricketeer Nov 19 '16 at 16:04
  • this might help: https://stdworkflow.com/386/mac-error-running-homebrew-as-root-is-extremely-dangerous-and-no-longer-supported#:~:text=Error%20message,the%20root%20user%20to%20install. – Gowtham S Jul 07 '22 at 14:51

2 Answers2

10

As the error says:

Error: Running Homebrew as root is extremely dangerous and no longer supported.

Run it without sudo as:

brew doctor

Also take a look at: Viji's answer for installing doctor

Community
  • 1
  • 1
Moinuddin Quadri
  • 46,825
  • 13
  • 96
  • 126
2

Do not use sudo when running brew doctor as brew in general modifies binaries in your /usr/ directories which when binaries are owned by root could cause issues later one.

Just run brew doctor

ioneyed
  • 1,052
  • 7
  • 12