I can not install zsh with Homebrew

OS X El Capitan version 10.11.2

I tried brew update , but this error message is displayed.

 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mach (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/local/Library/Homebrew/extend/pathname.rb:2:in `<top (required)>' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/local/Library/Homebrew/global.rb:3:in `<top (required)>' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/local/Library/brew.rb:15:in `<main>' 

I also tried brew install zsh , but the following message was displayed.

Please let me know how to fix this error message.

+5
source share
1 answer

Found an answer that worked for me here: fooobar.com/questions/24501 / ...

The problem mainly arises after upgrading OS X to El Capitan (OS X 10.11). This is mainly due to file permissions issues with the El Capitans file of the new SIP process . Try changing the permissions of the / usr / local directory.

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

If it still does not work, use the following steps and everything will be fine. Perhaps this is due to the fact that homebrew is not updating.

 1. open terminal 2. $ cd /usr/local 3. $ git reset --hard 4. $ git clean -df 5. $ brew update 
+4
source

Source: https://habr.com/ru/post/1244049/


All Articles