LoginSignup
1
1

More than 3 years have passed since last update.

homebrewでghostscriptがlinkできない時の対処法

Posted at

エラー内容

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