3
votes

I'm trying to install HomeBrew on my iMac running OSX 10.11.1 El Capitan.

On the HomeBrew home page there is a short script in Ruby to paste into Terminal. When I did this, I got an error message as pasted below:

chown: King_Bud: illegal user name Failed during: /usr/bin/sudo /usr/sbin/chown King_Bud /usr/local/. /usr/local/bin /usr/local/lib /usr/local/share /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/doc

Based on the above message, I ran the first aid program in disk utilities and no permission errors were identified. But the above error code suggests some type of permission problem.

I see there was a post 2 years ago describing a similar error message but it sounds like this was occurring after HomeBrew was already installed, and pertained to installing new packages rather than the HomeBrew program itself. How to fix homebrew permissions?

Any thoughts about how to resolve the "illegal user name" problem would be appreciated.

1

1 Answers

3
votes

I figured out the problem.

the chown error message was being created because my $USER environmental variable in my bash_profile was not matching the name of my logged-in user name as identified in Finder.

When I went into my bash_profile and edited the USER environmental variable so that $USER was the same as my logged-in user name in Finder, then I was able to successfully install HomeBrew using the pasted command from the HomeBrew home page.

Hopefully this posting will be helpful for anyone in the future who gets a similar error message while trying to install HomeBrew.