Homebrew , python installing

后端 未结 2 942
遇见更好的自我
遇见更好的自我 2020-12-23 00:00

i got an error while trying to install python throught homebrew. brew says what it failed to link python , here is output:

Linking /usr/local/Cellar/python/2         


        
相关标签:
2条回答
  • 2020-12-23 00:28

    Sounds like a permissions issue with /usr/local.

    ### Makes you owner of /usr/local 
    $ sudo chown -R `whoami` /usr/local
    
    ### Force uninstalls failed python
    $ brew uninstall -f python
    
    ### Clear the brew cache
    $ rm -rf `brew --cache`
    
    ### Recreate the brew cache
    $ mkdir `brew --cache`
    
    ### Cleanup - cleans up old homebrew files
    $ brew cleanup
    
    ### Prune - removes dead symlinks in homebrew
    $ brew prune
    
    ### Doctor - runs homebrew checks for common error causing issues
    $ brew doctor
    
    ########
    ### Google and follow steps to fix what `brew doctor` came back with
    ########
    
    ### Reinstall python
    $ brew install python
    
    0 讨论(0)
  • 2020-12-23 00:34

    Did you try brew link --overwrite python? This worked for me without having to uninstall python - see this question for more details.

    0 讨论(0)
提交回复
热议问题