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

Add support for macOS 10.13 High Sierra #49

Merged
merged 5 commits into from
Oct 9, 2017
Merged

Conversation

ktheory
Copy link
Contributor

@ktheory ktheory commented Sep 28, 2017

This script on High Sierra works for me.

As for dropping legacy support, I’m inclined to do that whenever it
becomes a support burden.

  • Removes an old workaround from Aug 2016
  • Skips /usr/local ownership check on new systems. I don't think we need this anymore since everything else under /usr/local is owned by the user.

👋 @talaris

This script on High Sierra works for me.

As for dropping legacy support, I’m inclined to do that whenever it
becomes a support burden.
It doesn’t seem needed anymore
@willmanduffy
Copy link

I remember the /usr/local bug biting a bunch of people setting up machines around that time period: #43

Are we sure that's resolved now?

@ktheory
Copy link
Contributor Author

ktheory commented Sep 28, 2017

Are we sure that's resolved now?

@willmanduffy Thanks! Nope; it's not resolved. Gonna take another pass.

Note that sudo chown -R $(whoami) /usr/local failed after upgrading to macOS 10.13 with an "Operation not permitted" error. I presume the upgrade reset SIP file system protection.

The next best fix that comes to mind is to install node with a different $N_PREFIX, like $HOME/.n (so node versions are installed in a user-writeable location by default. Or we can have this script just make an chown the directory n expects: sudo mkdir -p /usr/local/n; sudo chown $(whoami) /usr/local/n

@talaris
Copy link
Member

talaris commented Oct 9, 2017

Per Homebrew/brew#3228 there is a different command to change ownership now. Because SIP blocks changing /usr/local but it doesn't block the subdirectories under it.

sudo chown -R $(whoami) $(brew --prefix)/*

Pushing a commit

Copy link

@natachaS natachaS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

@talaris talaris merged commit edf6c73 into master Oct 9, 2017
@talaris talaris deleted the macos-10.13-high-sierra branch October 9, 2017 19:24
@talaris
Copy link
Member

talaris commented Oct 11, 2017

@jonathan-dejong
Copy link

jonathan-dejong commented Nov 6, 2017

Hi!

Just booted up a brand new Macbook Pro and brew is one of the first thing I've attempted to install after first updating it to High Sierra etc.
Here is what I had to do to make brew work as expected (so far, will update with more if more is required) from a completely fresh install.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
sudo mkdir /usr/local/Cellar
sudo mkdir /usr/local/opt
sudo mkdir /usr/local/include
sudo mkdir /usr/local/Frameworks
sudo chown -R $(whoami) $(brew --prefix)/*
brew install git

And running brew doctor after this I get a green light Your system is ready to brew.

mac
print_status "Fixing /usr/local permissions issue"
sudo chown -R "$(whoami)" /usr/local
sudo chown -R "$(whoami)" sudo chown -R "$(whoami)" "$(brew --prefix)"/*

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right...?

@matinfo
Copy link

matinfo commented Nov 19, 2017

I also created this directory, was need for Python 3 homebrew install:
sudo mkdir /usr/local/Frameworks
and running :
sudo chown -R $(whoami) $(brew --prefix)/*

@jonathan-dejong
Copy link

@matinfo adding it to my post for completeness

@embryologist
Copy link

solved by changing subdir permissions as mentioned by @ktheory

@ghost
Copy link

ghost commented Dec 11, 2017

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

that works.

@DavidBiesack
Copy link

I've done

sudo chown -R $(whoami) $(brew --prefix)/*

but

brew update

still fails:

brew update
Error: /usr/local is not writable. You should change the ownership
and permissions of /usr/local back to your user account:
  sudo chown -R $(whoami) /usr/local

Is there some way to allow brew update to work?

@matinfo
Copy link

matinfo commented Aug 17, 2018

@DavidBiesack: What is your current directory permission of /usr/local ?

@DavidBiesack
Copy link

ls -ald /usr/local
drwxr-xr-x  22 root  wheel  704 Aug  1 22:14 /usr/local

I believe this is related to Homebrew/brew#3228
However, I've done sudo chown -R $(whoami) $(brew --prefix)/* as noted on that issue.
It's really a homebrew issue, not kickstarter/laptop (but they also closed that issue for comments?)

@Bastorx
Copy link

Bastorx commented Dec 19, 2018

If you want chown /usr/local

Just disable csrutil disable (Recovery mode)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants