Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
36
Help us understand the problem. What is going on with this article?
@ponsuke0531

HomebrewでdoctorしたらWarning: You have unlinked kegs in your Cellarとなった時の対応方法

More than 3 years have passed since last update.

環境
OS : macOS High Sierra
Homebrew : 1.3.7

事象 : brew doctorしたらWarning: You have unlinked kegs in your Cellarとなった

事象
$ 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 and just ignore them. 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:
  php56
  ruby

原因 : linkできてないから

対応方法 : いらないパッケージの場合

いらないパッケージ
// 一応unlinkしておく
$ brew unlink php56
Unlinking /usr/local/Cellar/php56/5.6.29_5... 0 symlinks removed

// ディレクトリ削除
$ rm -drf /usr/local/Cellar/php56/

// デッドリンクになっているものを削除
$ brew prune

// 今一度doctorするとphp56が消える
$ 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 and just ignore them. 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:
  ruby

対応方法 : いるパッケージの場合

いるパッケージ
// ちゃんとlinkする
$ brew link ruby
Linking /usr/local/Cellar/ruby/2.4.2_1... 3003 symlinks created

// 今一度doctorするとるrubyが消える
$ brew doctor
Your system is ready to brew.

参考

36
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ponsuke0531
びっくりするほど物覚えが悪いが、エンジニアを目指しています。

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
36
Help us understand the problem. What is going on with this article?