7

I need to install homebrew but I get this after pasting the command

The user "me" cannot be found

There was an unknown error.

This script requires the user “me” to be an Administrator. If this sucks for you then you can install Homebrew in your home directory or however you please; please refer to our homepage. If you still want to use this script set your user to be an Administrator in System Preferences or `su' to a non-root user with Administrator privileges.

I think it might have something to do with changing the name of my account / home directory a few months ago, but I followed all steps carefully. I really would like to avoid having to wipe everything.

I've tried using su and I get

su: Sorry

I've tried using sudo and I get

Don't run this as root!

come on

I've tried to work around it creating a new admin user and installing homebrew from there, and it works, but then I can't use it from the main user. Switching users all the time would be a pain. Any ideas?

////EDIT

My primary account is an admin account. It is the only account at the moment. When I use id I get 80(admin).

When I install from another admin account and then I try to use brew from my main account I get permission errors (can't paste them right now because I removed that installation) Should I install from a secondary account and then try to change permission of all homebrew folders and files to my main account? Does that make any sense? Would I be able to remove the dummy account later?

////EDIT 2

I still don't know what was wrong but I worked around it I guess?

I created a second admin account and installed homebrew, then used this to change permissions of /usr/local and removed the new account.

  • If you've installed it with another Admin account, that should install it system-wide, and it should be available to all users. – Dr.Ping Oct 30 '16 at 15:09
  • 1
    It sounds like your primary account is not an admin account. Use your secondary/admin account to promote your primary account to an admin account via System Preferences. – Spiff Oct 30 '16 at 18:22
1

I had this same issue, the problem was that I override the variable $USER inside my bash_profile, because of my customization in iTerm2.

Just enter inside your bash_profile:

nano ~/.bash_profile

Or use your preffered terminal editor.

Search for $USER variable and delete the line.

Close and open a new terminal window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.