HomeBrew Mac os x 10.8 throwing errors no such file to load
I had the same problem and resolved it by
cd /usr/local
git status
If git status
shows a long list of things have been deleted then this is likely your problem and was probably caused by a change to your RVM setup.
To fix this, do:
git reset --hard
Now try:
brew update
It might say that you need to remove some files first. Remove each file in that list with the sudo rm
command. Then do brew update
again.
Also you might need to do:
sudo chown -R $USER /usr/local
before you can run brew install.
I used github.com/mxcl/homebrew/issues/18600 as a reference.
Cannot update brew in MAC OS X el capitan and keep getting a Load error with `require`
You shouldn’t use sudo
with Homebrew. First run the following to ensure you own everything under /usr/local
:
sudo chown -R $(whoami):admin /usr/local
Alternative command for newer macOS version:
sudo chown -R $(whoami) $(brew --prefix)/*
Then reset your Homebrew repo to a clean state:
cd /usr/local && git fetch && git reset --hard origin/master
It should fix your issues.
(replace /usr/local
with $(brew --prefix)
if you installed Homebrew elsewhere)
How to fix homebrew permissions?
I was able to solve the problem by using chown
on the folder:
sudo chown -R "$USER":admin /usr/local
Also you'll (most probably) have to do the same on /Library/Caches/Homebrew
:
sudo chown -R "$USER":admin /Library/Caches/Homebrew
Apparently I had used sudo
before in a way that altered my folder permission on /usr/local
,
from here on forward all installations with brew have proven to be successful.
This answer comes courtesy of gitHub's homebrew issue tracker
Related Topics
How Does Object_Id Assignment Work
Suppress Ruby Warnings When Running Specs
Using Net::Http.Get For an Https Url
Find Indices of Elements That Match a Given Condition
Rescue_From Actioncontroller::Routingerror in Rails 4
Why Am I Getting Objects Printed Twice
Error Installing Libv8: Error: Failed to Build Gem Native Extension
Difference Between Map and Collect in Ruby
Difference Between Datetime and Time in Ruby
How to 'Validate' on Destroy in Rails
Rails: Activerecord Query Based on Association Value
Ruby 1.9: How to Properly Upcase & Downcase Multibyte Strings
How to Force Rails_Env in a Rake Task