11

just upgraded to beta El Capitan for developers.

Deniss-MBP:src me$ brew install hg
Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.
==> Downloading https://mercurial.selenic.com/release/mercurial-3.4.2.tar.gz
Already downloaded: /Library/Caches/Homebrew/mercurial-3.4.2.tar.gz
==> make PREFIX=/usr/local/Cellar/mercurial/3.4.2 install-bin
#include <stdio.h>
         ^
1 error generated.
error: command 'clang' failed with exit status 1
make: *** [build] Error 1

READ THIS: https://git.io/brew-troubleshooting

Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.

Any ideas how to make it work?

Note: When I do brew doctor it says

Warning: Your Xcode (6.3.2) is outdated
Please update to Xcode 7.0.
Xcode can be updated from
  https://developer.apple.com/downloads

But I do have xcode-beta 7 installed on my computer. Not sure this is linked. Just in case

1
  • 1
    brew update fixed Warning: You are using OS X 10.11. for me.
    – twhoward99
    Oct 30, 2015 at 15:50

3 Answers 3

11

First I recommend you go over this: https://www.reddit.com/r/apple/comments/3994os/rootless_feature_is_in_os_x_1011_and_it_disallows/

The rootless security changed a lot of things in El Capitan, other than that where does your xcode-select point to? You can use xcode-select -h to see the usage, it's very simple.

2
  • You pointed me in the right direction I type xcode-select -p which pointed to the old version of Xcode (not the beta). So I switched the path to the Xcode-beta.app like so: sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer (Had to sudo or it doesn't work)
    – denislexic
    Jul 15, 2015 at 11:50
  • Glad to help. another tip: sudo xcode-select -s /Applications/Xcode-beta.app/ should work too.
    – Shrewd
    Jul 15, 2015 at 11:54
14

Check out El Capitan & Homebrew:

If /usr/local exists already:

sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local

If /usr/local does not exist:

  • Reboot into Recovery mode (Hold Cmd+R on boot) & access the Terminal.
  • In that terminal run: csrutil disable
  • Reboot back into OS X
  • Open your Terminal application and execute:

    sudo mkdir /usr/local && sudo chflags norestricted /usr/local && sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local
    
  • Reboot back into Recovery Mode & access the Terminal again.

  • In that terminal execute: csrutil enable
  • Reboot back into OS X & you'll be able to write to /usr/local & install Homebrew.
1
  • The doc you reference is now gone.
    – Conrad
    Mar 23, 2016 at 19:01
3

Making a sudo chown -R $(whoami):admin /usr/local will break any agents that may be stored under /usr/local subfolders, that must be owned by root:wheel.

Note: in El Capitan, root:wheel is the default user:group that is set for /usr/local and its subfolders.

In addition, people might have 3rd party kernel extensions that must be also have root:wheel permissions (e.g. antivirus software), otherwise OS X will prevent them to be loaded.

So setting /usr/local to $(whoami) is definitely the worst idea to do.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .