LoginSignup
3
1

More than 3 years have passed since last update.

Homebrewの再インストール

Last updated at Posted at 2021-02-03

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)"

以上です.

3
1
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
3
1