05-10-2021

補足: OSX El Capitanでpyenv installに失敗する場合 環境 ・Mac OSX 10.11.3(OSX El Capitan) homebrewのインストール. まずは、homebrewをインストールします。 これはこちらの記事で。 pyenvのインストールとパスの設定 pyenvとは. El Capitanではsudoでも権限のない領域があって、うまくインストールする方法を見つけられなかった。python自体をホームフォルダにインストールし直せばよさそうだけど、ipythonなくても困らないだろうと思って今回はパス。.

You upgraded to Mac OS X El Capitan and cannot use Homebrew anymore. As a developer myself who uses homebrew pretty regularly, I can totally understand the feeling.

The reason these permission issues are arising is a result of Apple's new changes to Mac OS X 10.11 El Capitan called SIP which stands for System Integrity Protector. More about SIP towards the end of this article.

Here is how you can fix the permission issues with Homebrew in Mac OS X El Capitan:

If you had created the /usr/local directory already, then run this command in terminal:

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

Capitan

And you should be all set.

Update - I have created this new guide titled - How to install Homebrew in Mac OS X El Capitan?

However, If you are doing a fresh install or cannot create /usr/local directory anymore, then follow these steps:

Homebrew El Capitan Update

Step 1: Reboot into Recovery mode (Hold Cmd+R on boot) & access the Terminal. (Yes, you will have to go into recovery mode as that is the only way to disable SIP as of now.)

Step 2: In the terminal, run the following command:

csrutil disable

Step 3: Reboot back into OS X El Capitan

Step 4: Once Mac restarts, Open your Terminal and run the following command:

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

Step 5: After you have done above, you will need to reboot back into Recovery Mode once more & open the Terminal and type the following command:

csrutil enable

Step 6: Now, reboot back into OS X

Step 7: You will now be able to write to the /usr/local directory and proceed with installing Homebrew as you would regularly.

Please Note:

You need not worry about any of the steps of issues that I outlined above if you have not installed Homebrew in /usr/local or another system-protected directory.

More about SIP - System Integrity Protector:

With SIP, you can no longer write to system directories like /usr , /System and /bin even though you have root permissions or you you have logged in as the user root.

According to the Apple documentation, the /usr/local directory will have the root:wheel restricted permissions like before with every forthcoming OS X update.

The Homebrew team has acknowledged this issue and they will soon be adding a brew doctor check that will warn you about any of these issues in the near future.

Thanks for reading and please let me know in the comments section, if this helped you.

?>

From the machine-learning-scientific-and-plotting dept. (71840) (26) by Luis

Here is a very quick way to install octave with aquaterm on Mac OS X 10.10 a.k.a. Yosemite as well as 10.11 a.k.a El Capitan. Note that these steps are not for the feign of heart and your millage might vary... Follow at your own risk.

Homebrew osx el capitan

updated 2016-11-21 22:32 GMT - tested with macOS Sierra (10.12) works well
updated 2015-10-07 21:58 GMT - tested with El Capitan (10.11) works well
updated 2015-06-21 09:17 GMT - adds homebrew/science tap
updated 2014-10-24 05:15 GMT - includes MacTex

El Capitan High School

Before you start you need to get your system setup. You will need:

Homebrew El Capitan System

  1. install Xcode from Apple's dev site
  2. install Xcode command line utilities from Xcode add-ons
  3. install hombrew
  4. install AquaTerm from sourceforge
  5. install Mac Latex (MacTex) from tug.org
  6. (optional) install Java

Yep, note that I'm assuming that you already have a working Homebrew installation, compilers, and AquaTerm ready... Then you may do:

Homebrew Mac Os El Capitan

  1. brew tap homebrew/science
  2. brew reinstall gnuplot --with-aquaterm
  3. gnuplot # make sure it says 'terminal set to aqua'
  4. brew install lua51 # yes, you also need this old version of Lua
  5. brew install octave

El Capitan State Beach

Installing Octave will take a while and it will install Lua 2.x as a dependency. If you see the make check | tee make-check.log taking an extremely long time. You might have to open a new terminal and navigate to cd /tmp/octave* and cat make-check.log to see where it went wrong. In my case it used to stop while loading lua dynlib files but installing the older lua51 fixed it.

Homebrew El Capitan Mac

When updating your operating system to a newer version of MacOS (macOS now), you may need to reinstall Octave if you see an error like:

Try: brew reinstall gcc arpack. If that does not fix it, then try: brew reinstall octave --without-arpack. And if this fails, you may use: brew reinstall octave --with-java.

Leave a comment if you need help, but this should do the trick ;) Now you can move on with your Machine Learning studies!

Homebrew El Capitan 2

Here is a quick way to know everything works correctly:

  1. octave
  2. a = [2;3;4;5;6;3;4;32;3;2;1;4;5;6;7;]
  3. b = [12;23;44;55;66;12;44;9;5;27;111;23;66;89;88;]
  4. plot ([a, b])

Happy plotting!