エラー内容
brew doctor
をしたらこういうのが出た。
~
❯ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
ghostscript
なのでbrew link ghostscript
したら怒られた。(overwriteでもダメだった。)
~
❯ brew link ghostscript
Linking /usr/local/Cellar/ghostscript/9.52...
Error: Could not symlink share/doc/ghostscript/9.52
/usr/local/share/doc/ghostscript is not writable.
対処法
以下を入力
sudo chown -R 'whoami' /usr/local/share/ghostscript
'whoami'
は自分のユーザ名を入れる。
わからなければwhoami
コマンドで確認できる。
その後、ghostscriptのリンクをoverwriteすれば解決する。
~
❯ brew link --overwrite ghostscript
Linking /usr/local/Cellar/ghostscript/9.52... 59 symlinks created
~
❯ brew doctor
Your system is ready to brew.