brew install python, but then: “python-2.7.6 already installed, it's just not linked”

旧时模样 提交于 2019-12-09 07:28:34

问题


disclaimer: noob

OSX 10.8.5

When I installed python in bash I got this warning and error:

Warning: Could not link python. Unlinking...
Error: The 'brew link' step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using 'brew link python

So I went ahead and typed

brew link python

and got

Linking /usr/local/Cellar/python/2.7.6... Warning: Could not link python. Unlinking...

Error: Could not symlink file: /usr/local/Cellar/python/2.7.6/bin/smtpd2.py 
Target /usr/local/bin/smtpd2.py already exists. You may need to delete it. 
To force the link and overwrite all other conflicting files, do:

brew link --overwrite formula_name

Should I do it? What does is mean to link python in this context, let alone force-link it, and what's formula_name?

This question is similar but also different, so I'm afraid to try the top rated answer as it might just dig me deeper into the rabbit hole that I am stuck in right now.


回答1:


It looks like you have installed Python using another method before. Don't be scared. Homebrew is engineered so it won't mess up your system like Mac Ports et al.

You can always do brew link --overwrite --dry-run python to see first what exactly will be overwritten, without actually doing it.

If once you do this it look like it is only overwriting or deleting *.py scripts, then you should be even less scared.



来源:https://stackoverflow.com/questions/20691181/brew-install-python-but-then-python-2-7-6-already-installed-its-just-not-li

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!