0

I'm trying to install Xdebug on macOS Catalina but home-brew no longer allowed to run as root. Worked fine before Catalina update.

I was running Xdebug under Mojave but Catalina upgrade broke it. Removed extension to reinstall and then hit hombrew issue: get the following error when running brew as root:

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.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
  • Can you add details about the issue you get when not running as root ? – Louis Charette Oct 14 '19 at 22:13
  • ok so if I run homebrew as a standard user (my fault as I assumed it should be run as root) during the update of homebrew I get the following error;Error: The following formula [#, #] cannot be installed as binary package and must be built from source. Install the Command Line Tools: xcode-select --install but the Xcode command line tools are installed as I had to do that as virtual studio code was not recognising my git installation. It then continues to install php cleanly. subsequent step to install autoconf also runs clean – user12208978 Oct 16 '19 at 16:05
  • I managed to install Xdebug on Catalina while building from source. See both links: https://bbqsoftwares.com/blog/xdebug-catalina & https://stackoverflow.com/a/58384397/445757 – Louis Charette Oct 16 '19 at 16:08

2 Answers2

0

Brew should be working without using sudo.
If that's not the case, your homebrew install is broken and you might need to reinstall it.

In any case brew doctor is something you can always consult.

After you got your homebrew fixed,
looking into Can't install xdebug on Mac with Homebrew might be of help.

luckydonald
  • 5,976
  • 4
  • 38
  • 58
0

Updating homebrew should do the trick -

brew update
BentheFolker
  • 301
  • 3
  • 5