Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install on Sierra #1556

Closed
ghost opened this issue Nov 23, 2016 · 20 comments · Fixed by Homebrew/install#93
Closed

Can't install on Sierra #1556

ghost opened this issue Nov 23, 2016 · 20 comments · Fixed by Homebrew/install#93

Comments

@ghost
Copy link

ghost commented Nov 23, 2016

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following existing directories will be made group writable:
/usr/local/bin

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/bin
==> Downloading and installing Homebrew...
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
HEAD is now at 17bad9a Merge pull request #1374 from sjackman/bottle-checksums
ln: /usr/local/bin/brew: Permission denied
Failed during: ln -sf /usr/local/Homebrew/bin/brew /usr/local/bin/brew

and my system integrity is disabled

@MikeMcQuaid
Copy link
Member

and my system integrity is disabled

Please re-enable it.

You need to uninstall and reinstall Homebrew using the instructions here: https://github.com/Homebrew/install

@ghost
Copy link
Author

ghost commented Nov 24, 2016

uninstall can't locate homebrew and install fails with the exact same error

@MikeMcQuaid
Copy link
Member

sudo chown -R $USER /usr/local

@ghost
Copy link
Author

ghost commented Nov 24, 2016

nope, same

@MikeMcQuaid
Copy link
Member

What's the output of running that command (if any) and what did you try afterwards and what was the output then?

@ghost
Copy link
Author

ghost commented Nov 24, 2016

$ sudo chown -R hydroflame /usr/local
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following existing directories will be made group writable:
/usr/local/bin

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/bin
==> Downloading and installing Homebrew...
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
HEAD is now at 62e0ecd Merge pull request #1559 from MikeMcQuaid/unsupported-better-exceptions
ln: /usr/local/bin/brew: Permission denied
Failed during: ln -sf /usr/local/Homebrew/bin/brew /usr/local/bin/brew

@MikeMcQuaid
Copy link
Member

What does ls -lha /usr/local/bin output?

@MikeMcQuaid
Copy link
Member

and ls -lha /usr/local?

@ghost
Copy link
Author

ghost commented Nov 24, 2016

$ ls -lha /usr/local/bin
$ ls -lha /usr/local
total 16
drwxr-xr-x   22 hydroflame  admin   748B 23 Nov 15:06 .
drwxr-xr-x@  12 root        wheel   408B 23 Nov 15:23 ..
drw-rwxr--  158 hydroflame  admin   5.2K 23 Nov 15:32 bin

(edited)

@MikeMcQuaid
Copy link
Member

sudo rm -rf /usr/local/bin and then reinstall.

@astubbs
Copy link

astubbs commented Nov 28, 2016

With a fresh Sierra, I have the exact same problem. Initial install failed in the same way - permission denied. Uninstall cannot locate home-brew.

==> The following existing directories will be made group writable:
/usr/local/bin

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/bin
==> Downloading and installing Homebrew...
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
HEAD is now at 0f529da Merge pull request #1573 from sorin-ionescu/fix-xcode-version-comparison
ln: /usr/local/bin/brew: Permission denied
Failed during: ln -sf /usr/local/Homebrew/bin/brew /usr/local/bin/brew
Antony-Stubbs-MBP:~ antony$ ls -la /usr/local/bin

Antony-Stubbs-MBP:~ antony$ ls -lha /usr/local/bin
total 248
dr-xrwxr-x   4 antony  admin   136B Nov 28 13:55 .
drwxr-xr-x  13 root    wheel   442B Nov 28 13:33 ..
-r-xr-xr-x   1 root    wheel    77K Jul 13  2012 hppaauthtool
-r-xr-xr-x   1 root    wheel    41K Jul 13  2012 launcher
Antony-Stubbs-MBP:~ antony$ ls -lha /usr/local
total 0
drwxr-xr-x  13 root    wheel   442B Nov 28 13:33 .
drwxr-xr-x@ 11 root    wheel   374B Nov 28 13:34 ..
drwxrwxr-x   3 antony  admin   102B Nov 28 13:51 Cellar
drwxrwxr-x   2 antony  admin    68B Nov 28 13:33 Frameworks
drwxrwxr-x  16 antony  admin   544B Nov 28 13:34 Homebrew
dr-xrwxr-x   4 antony  admin   136B Nov 28 13:55 bin
drwxrwxr-x   2 antony  admin    68B Nov 28 13:37 etc
drwxrwxr-x   2 antony  admin    68B Nov 28 13:33 include
drwxrwxr-x   2 antony  admin    68B Nov 28 13:33 lib
drwxrwxr-x   3 antony  admin   102B Nov 28 13:51 opt
drwxrwxr-x   2 antony  admin    68B Nov 28 13:33 sbin
drwxrwxr-x   3 antony  admin   102B Nov 28 13:33 share
drwxrwxr-x   3 antony  admin   102B Nov 28 13:37 var
Antony-Stubbs-MBP:~ antony$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Failed to locate Homebrew!

@MikeMcQuaid
Copy link
Member

With a fresh Sierra, I have the exact same problem.

What was already in /usr/local/bin in a fresh Sierra?

@astubbs
Copy link

astubbs commented Nov 28, 2016

Hard to say, I didn't set it up. Don't have a log of what was in it before I ran the install command.

@astubbs
Copy link

astubbs commented Nov 28, 2016

Ok so when I say fresh, I can't be sure exactly how "fresh" it was :/

@astubbs
Copy link

astubbs commented Nov 28, 2016

Strange. If I make /usr/local/bin user writeable, everything works as expected :/

@astubbs
Copy link

astubbs commented Dec 3, 2016

Nice. But if I was in the group that owned the dir - it should have worked. Any ideas?

@MikeMcQuaid
Copy link
Member

@astubbs Your /usr/local/bin was not writeable.

@astubbs
Copy link

astubbs commented Dec 3, 2016 via email

@MikeMcQuaid
Copy link
Member

@astubbs I don't know what's going on. You've got it fixed now so it's not worth digging into any further on our end. Thanks!

@astubbs
Copy link

astubbs commented Dec 3, 2016 via email

@Homebrew Homebrew locked and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants