1

I installed PIL and then I installed libjpeg and I get the following errors:

    jpeg8-d is already installed, it's just not linked
    Could not symlink file: /usr/local/Cellar/jpeg/8d/bin/wrjpgcom
    Target /usr/local/bin/wrjpgcom already exists. You may need to delete it.
    To force the link and delete this file, do:
    brew link --overwrite formula_name
abarnert
  • 354,177
  • 51
  • 601
  • 671
Jennifer
  • 297
  • 2
  • 5
  • 9
  • I'm learning. I can build a computer so all I've ever dealt with is the hardware side of the computer not software. – Jennifer Nov 14 '12 at 01:54

1 Answers1

8

Both the problem and the solution are completely described by the error message you posted. What part of it do you not understand?

Could not symlink file: /usr/local/Cellar/jpeg/8d/bin/wrjpgcom
Target /usr/local/bin/wrjpgcom already exists.

This is telling you that, for some reason, you've got already got a /usr/local/bin/wrjpgcom from somewhere besides Homebrew, and Homebrew doesn't want to mess with it, in case you had a good reason for it.

To force the link and delete this file, do:
brew link --overwrite formula_name

If you have no idea where that file came from, don't care, and just want it to be blasted, just do brew link --overwrite jpeg8-d.

You probably also want to run brew doctor to have it look for other problems in your setup that you should fix.

abarnert
  • 354,177
  • 51
  • 601
  • 671
  • Like I said above I'm learning. I've always dealt with the hardware side of the computer ie build computers. – Jennifer Nov 14 '12 at 01:56
  • 3
    @Jennifer: Learning programming is great. But you also need to learn how to ask on SO effectively. It's much more complicated than you'd expect. The "what part of it do you not understand" isn't an insult; without knowing that, we have to guess what part to explain, and there's a good chance we'll either miss what you need, or insult your intelligence. Plus, we want the answers to be useful to future searchers, and some of us may even want to submit a patch to Homebrew to improve the error message to make it clearer. – abarnert Nov 14 '12 at 02:09
  • Whoever downvoted (months after the fact), care to explain why? – abarnert Jun 18 '13 at 00:47
  • I have similar problem with `aspell`. The problem is I looked in Finder and the existing target is not there. And if I force overwrite the link, it got denied because I have no permission. – LWZ Sep 27 '13 at 08:16
  • 3
    @LWZ: Most likely you used some other, non-Homebrew, means to install `aspell` into /usr/local, and then partially uninstalled it later, and it's only writable by root. So, you will have to delete it or force-overwrite it with root privileges. For example, `sudo rm /usr/local/bin/aspell` should work. But really, you should ask a new question on that, not a comment on someone else's question, if for no other reason than that you can provide more information and we can make sure we're not giving you advice that isn't appropriate to your situation and won't break your computer… – abarnert Sep 30 '13 at 18:41
  • @abarnert Thank you for your help! I do have a new question here http://stackoverflow.com/q/19022015/1382745 and I still haven't got it working. – LWZ Oct 01 '13 at 23:38