Homebrew Installation, Update errors. Corrupt?

Cannot seem to update Homebrew to newer version so I can follow along w/ tutorials and install/update command line tools, Xcode etc.

Any help appreciated thank you!

Are you able to run brew doctor? If so, does it give you any guidance?

I can run brew doctor. I don’t understand what it means however.

Thanks

Can you cut/paste that full error message from your terminal into the text box (instead of a photo)? Googling errors can be a quick strategy for this sort of issue. I’ll dig into it and see what I find.

Last login: Fri Aug 28 14:47:54 on ttys000

The default interactive shell is now zsh.

To update your account to use zsh, please run chsh -s /bin/zsh.

For more details, please visit https://support.apple.com/kb/HT208050.

Johns-iMac:~ nebulosa$ brew doctor

Traceback (most recent call last):

4: from /usr/local/Homebrew/Library/Homebrew/brew.rb:24:in `’

3: from /usr/local/Homebrew/Library/Homebrew/brew.rb:24:in `require_relative’

2: from /usr/local/Homebrew/Library/Homebrew/global.rb:16:in `<top (required)>’

1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require’

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require’: cannot load such file – active_support/core_ext/object/blank (LoadError)

Johns-iMac:~ nebulosa$

Looking at StackOverflow, some people have solved this by running brew update-reset. Try that, then another 'brew doctor` and see if anything changes.

Ok I thought maybe brew update-reset would fix the issue too just now but still shows after running brew doctor again. It looks like I may have a different Homebrew tap from an old command line program that I had which modified something?

Johns-iMac:~ nebulosa$ brew update-reset

==> Fetching /usr/local/Homebrew…

remote: Enumerating objects: 68, done.

remote: Counting objects: 100% (56/56), done.

remote: Compressing objects: 100% (2/2), done.

remote: Total 8 (delta 6), reused 8 (delta 6), pack-reused 0

Unpacking objects: 100% (8/8), done.

From https://github.com/Homebrew/brew

49fa3cc75…257e4cc7a master -> origin/master

==> Resetting /usr/local/Homebrew…

error: unknown object type 5 at offset 1178274 in .git/objects/pack/pack-f46d00e1c3eece68cce849a7b71b0ebaec9694e2.pack

fatal: packed object 3e989830ba206a71ed27fa3c95f713ea341e1daf (stored in .git/objects/pack/pack-f46d00e1c3eece68cce849a7b71b0ebaec9694e2.pack) is corrupt

==> Fetching /usr/local/Homebrew/Library/Taps/ethereum/homebrew-ethereum…

==> Resetting /usr/local/Homebrew/Library/Taps/ethereum/homebrew-ethereum…

Branch ‘master’ set up to track remote branch ‘master’ from ‘origin’.

Reset branch ‘master’

Your branch is up to date with ‘origin/master’.

==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core…

remote: Enumerating objects: 20, done.

remote: Counting objects: 100% (20/20), done.

remote: Compressing objects: 100% (6/6), done.

remote: Total 16 (delta 12), reused 14 (delta 10), pack-reused 0

Unpacking objects: 100% (16/16), done.

From https://github.com/Homebrew/homebrew-core

5600bf586b…33088496b3 master -> origin/master

==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core…

Updating files: 100% (5457/5457), done.

Branch ‘master’ set up to track remote branch ‘master’ from ‘origin’.

Reset branch ‘master’

Your branch is up to date with ‘origin/master’.

Johns-iMac:~ nebulosa$ brew doctor

Traceback (most recent call last):

4: from /usr/local/Homebrew/Library/Homebrew/brew.rb:24:in `’

3: from /usr/local/Homebrew/Library/Homebrew/brew.rb:24:in `require_relative’

2: from /usr/local/Homebrew/Library/Homebrew/global.rb:16:in `<top (required)>’

1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require’

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require’: cannot load such file – active_support/core_ext/object/blank (LoadError)

It could be an issue with Ruby. It looks like something is requiring the activesupport gem, and it can’t find it.

Ok I have been trying to gem install activesupport but now it keeps saying I don’t have write permissions for gem directory?? thanks for your help so far

Last login: Fri Aug 28 15:17:59 on ttys000

The default interactive shell is now zsh.
To update your account to use zsh, please run chsh -s /bin/zsh.
For more details, please visit https://support.apple.com/kb/HT208050.
Johns-iMac:~ nebulosa$ gem install activesupport
ERROR: While executing gem … (Gem::FilePermissionError)
You don’t have write permissions for the /Library/Ruby/Gems/2.6.0 directory.

Uninstalled Homebrew and tried from scratch now getting:

==> Downloading and installing Homebrew…

error: unknown object type 5 at offset 1178274 in .git/objects/pack/pack-f46d00e1c3eece68cce849a7b71b0ebaec9694e2.pack

fatal: packed object 3e989830ba206a71ed27fa3c95f713ea341e1daf (stored in .git/objects/pack/pack-f46d00e1c3eece68cce849a7b71b0ebaec9694e2.pack) is corrupt

Failed during: git reset --hard origin/master

Had to hunt down and Delete the actual Homebrew folder in usr/local and did fresh install seemed to sort everything out.

Your system is ready to brew. :+1:t3:

1 Like