Can't `brew link` an unlinked keg

后端 未结 4 585
小蘑菇
小蘑菇 2021-01-31 04:57
$: which node
$: node
-bash: node: command not found
$: brew install node
Error: node-0.6.18 already installed
$: brew doctor
Error: You have unlinked kegs in your Cella         


        
相关标签:
4条回答
  • 2021-01-31 05:20

    I personally had to work some sudo chmod magic for node files that were not writable. Brew didn't take care of them by default even after --force was enabled.

    0 讨论(0)
  • 2021-01-31 05:25

    I was able to relink the correct version of node by running:

    brew cleanup
    brew link node
    brew uninstall node
    brew install node
    
    0 讨论(0)
  • 2021-01-31 05:34

    I was getting:

    $ brew link node
    Error: No such keg: /usr/local/Cellar/node
    $ brew link node@8
    Warning: node@8 is keg-only and must be linked with --force
    

    That command helped to get everything working again:

    brew link --overwrite --force node@8
    
    0 讨论(0)
  • 2021-01-31 05:36

    To force the link and overwrite all conflicting files:

    brew link --overwrite node
    
    0 讨论(0)
提交回复
热议问题