LoginSignup
2
2

More than 1 year has passed since last update.

Homebrewをインストールした際に発生したエラーを解消

Last updated at Posted at 2022-09-22

概要

私がHomebrewをインストールしたときに発生したエラー解消方法を記載いたします。

環境

  • macOS Monterey Version 12.5.1
  • M1 Mac

1.以下のインストールコマンドをターミナルで実行

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

参照元はこちら

2.エラーが発生


Error: Failed to link all completions, docs and manpages:
Permission denied @ rb_file_s_symlink - (../../../Homebrew/completions/zsh/_brew, /usr/local/share/zsh/site-functions/_brew)
Failed during: /usr/local/bin/brew update --force --quiet

3.エラーを解消するコマンド

以下のコマンドを実行

$ sudo chown -R $(whoami) $(brew --prefix)/*
$ brew update --force --quiet

参考にしたサイト
https://nanxiao.me/en/fix-permission-denied-rb_file_s_symlink-error-of-installing-homebrew/

4.最後にインストール確認

以下のコマンドを実行

$ brew -v

以下のように表示されたらインストール成功

Homebrew 3.6.2
Homebrew/homebrew-core (git revision XXXXXXX; last commit 20XX-XX-XX)

最後に

参考にしていただけると幸いです。

2
2
1

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
2
2