Homebrew install - sudo?

13,758

Solution 1

Simple solution

in the terminal type first

sudo su
  1. Type the password

  2. Install homebrew

Solution 2

Open a new terminal session.

type sudo whoami

If it comes back with root then you have root privileges. You can also check under users and groups to see if you are an admin.

Also try running it again but using sudo first. You can also type sudo !! and that will run the previous command as sudo.

Share:
13,758
chunzg
Author by

chunzg

Updated on June 04, 2022

Comments

  • chunzg
    chunzg almost 2 years

    I am trying to install Homebrew in my terminal. It first asked me for Password which I typed in (the password I use to login to my computer) and hit enter. Then it comes up with 'Need sudo access on macOS!' - what does this mean? I am already the admin (as far as I know) as this is my personal laptop, noone else uses it. I don't understand what else they need!

    My aim is to install git but I can't even get this to install first..

    Can anyone help, thanks :)

    • Jérôme
      Jérôme about 4 years
      What is the command you're using ?
  • bfontaine
    bfontaine about 4 years
    FYI I downvoted, not because this is not true, but because it’s not useful here. Homebrew’s install script asks for sudo access for some operations, but the script itself should not be ran using sudo.
  • bfontaine
    bfontaine about 4 years
    Again: no. It’ll even abort itself if you try do so: github.com/Homebrew/install/blob/…
  • denfromufa
    denfromufa almost 2 years
    This resolved my issue - black magic!