16
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[Homebrew] cannot load such fileなどのエラーの対処法

Last updated at Posted at 2019-03-23

Homebrew を久しぶりに使おうとしたら以下のようなエラーが発生したのでメモ。

$ brew --help
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- active_support/core_ext/object/blank (LoadError)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/local/Homebrew/Library/Homebrew/global.rb:10:in `<top (required)>'
	from /usr/local/Homebrew/Library/Homebrew/brew.rb:21:in `require_relative'
	from /usr/local/Homebrew/Library/Homebrew/brew.rb:21:in `<main>'

brew style を実行するも変わらず。
(https://stackoverflow.com/questions/54888582/ruby-cannot-load-such-file-active-support-core-ext-object-blank)

また、sudo chown -R $(whoami):admin /usr/local は権限がないと言われ、

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

sudo chown -R $(whoami) $(brew --prefix)/* を実行するも変わらず。
(https://qiita.com/k-hotta/items/7236f68ef26f7771b02f)

対処法

公式サイトのコマンドから再インストールすると解決した。
https://brew.sh/index_ja

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
16
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?