Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Homebrew install - sudo?

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 :)

like image 375
chunzg Avatar asked May 30 '26 00:05

chunzg


2 Answers

  1. Run sudo visudo
  2. Enter you password one last time
  3. In the editor, search for %admin
  4. The line probably looks like this:
    %admin      ALL = (ALL) ALL
    
  5. Change it to this:
    %admin      ALL = (ALL) NOPASSWD: ALL
    
  6. Save and Bob's your uncle.
like image 66
gregmark Avatar answered May 31 '26 13:05

gregmark


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.

like image 42
Angela Rainey Avatar answered May 31 '26 13:05

Angela Rainey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!