Reputation: 127
I recently updated my Mac's copy of OSX from 10.6 to 10.10. Everything seems to be working fine except for brew.
my_mac:local my_user$ brew install wget
/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 -- global (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/brew.rb:15:in `<main>'
Since brew is based on Ruby I believe there's some problem with the system's install of Ruby, but I'm not sure how to approach it. I've tried to re-install the most recent version of Ruby and then Homebrew, but when Homebrew gets to
brew cleanup
It throws the same Ruby error.
Thanks!
Upvotes: 0
Views: 1185
Reputation: 9621
As others have mentioned it is because of corrupted permissions You can fix it using the following command:
sudo chown -R $(whoami):admin /usr/local
It changes the permissions of /usr/local directory.
Upvotes: 0
Reputation: 27
it turned to be permission problem. Here is the command I used to fix the problem based on the answer from quaestor
$ cd /usr/local<br>
$ find . -mindepth 1 -user root -exec chown *xxx* {} \ ;
Where *xxx* is the user you want to change to. You may want to only do chown for directories related to brew.
Upvotes: 0
Reputation: 11
I've just had this problem too and the problem was corrupted permissions:
$ cd /usr/local
$ find . -mindepth 1 -user root
If any files or directories related to homebrew show up, you should use chown
to fix the permissions.
Upvotes: 1