36

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.

Community
  • 1
  • 1
A__
  • 1,616
  • 2
  • 19
  • 33

1 Answers1

53

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.

William Denman
  • 3,046
  • 32
  • 34
  • Thanks! They were mostly .py docs but I overwrote it anyway and that actually solved other problems I was having too (like being able to install virtualenv). I guess this was just an issue between versions or something. – A__ Dec 19 '13 at 21:13
  • Welcome. Yeah definitely version collision. Best situation is that you fix all warnings given by `brew doctor`. – William Denman Dec 19 '13 at 21:14