mac系统下面调用brew报错core_ext/kernel_require.rb:55:in `require': cannot load such file

mac系统下面调用brew报错,如下所示:

/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- concurrent/synchronization (LoadError)
	from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/concurrent-ruby-1.1.4/lib/concurrent/map.rb:3:in `'
	from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/blank.rb:4:in `'
	from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/local/Homebrew/Library/Homebrew/global.rb:10:in `'
	from /usr/local/Homebrew/Library/Homebrew/brew.rb:17:in `require_relative'
	from /usr/local/Homebrew/Library/Homebrew/brew.rb:17:in `
'

问题引起的原因是安装scala的时候,一直卡在Updating Homebrew…
上面,然后被我手工取消了,并且执行了以下命令:

替换homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"

再次打开的时候就报上面的错误信息。

解决方法(也没有看懂,直接卸载后重新安装)

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

mac系统下面调用brew报错core_ext/kernel_require.rb:55:in `require': cannot load such file_第1张图片
安装brew:

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

mac系统下面调用brew报错core_ext/kernel_require.rb:55:in `require': cannot load such file_第2张图片

完成之后,再试一下brew -help应该可以正常打开

你可能感兴趣的:(mac环境)