Reinstall Homebrew
どうやらHomebrew内のreinstall
のようなものがないようなので一旦アンインストールしてからインストールしなおしてみます.
Attention
Homebrewを一旦消してしまうので元々入れていたパケージは消えてしまいます.なのでそれらも入れ直す必要があります.
Cause
一応ですがHomebrewを入れなおそうと思った理由を述べておきます.
$ brew update
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.sh: line 653: homebrew-update: command not found
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.sh: line 653: homebrew-update: command not found
Traceback (most recent call last):
5: from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:31:in `<main>'
4: from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:31:in `require_relative'
3: from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/global.rb:122:in `<top (required)>'
2: from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
1: from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/config.rb:32:in `<top (required)>': uninitialized constant GitRepositoryExtension (NameError)
となってしまい色々試しても改善できなかったということがあります.
Uninstall Homebrew
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
~省略~
You may wish to remove them yourself.
最後にこのメッセージが表示されていれば大丈夫だと思います.
Install Homebrew
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
以上です.