1

I am trying to install imagemagick on OS X Mavericks. When I run brew install imagemagick I get this output at the end:

Warning: Could not link imagemagick. 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 imagemagick'

Possible conflicting files are:
/usr/local/bin/convert
/usr/local/share/man/man1/convert.1
==> Summary

I tried some of the solutions listed here (not all though), but didn't get further. I also tried brew link imagemagick, but I get:

Linking /usr/local/Cellar/imagemagick/6.8.7-7... Warning: Could not link imagemagick. Unlinking...

Error: Could not symlink file: /usr/local/Cellar/imagemagick/6.8.7-7/bin/convert
Target /usr/local/bin/convert already exists. You may need to delete it.
To force the link and overwrite all other conflicting files, do:
  brew link --overwrite formula_name

To list all files that would be deleted:
  brew link --overwrite --dry-run formula_name

So my question: is it safe to run brew link --overwrite imagemagick? What could go wrong if I overwrite /usr/local/bin/convert?

Community
  • 1
  • 1
Alexander Popov
  • 23,073
  • 19
  • 91
  • 130
  • Worst that could go wrong is that you'll end up with a broken ImageMagick which isn't much worse to where you stand right now. Check that /usr/local is not a symlink to anywhere else before doing any forced installations, though, just to make sure you're not actually writing stuff in /usr/bin. –  Feb 05 '14 at 10:49
  • Thank you for your comment. How do I check that `/usr/local` is not a symlink to anywhere? – Alexander Popov Feb 05 '14 at 10:50
  • 2
    `ls -laid /usr/local`. If it is a sum link, it will show up with an 'l' in the left column and a `->` pointing at the target directory on the right – gaige Feb 05 '14 at 10:59
  • Why not post your comment as an answer? – Alexander Popov Feb 05 '14 at 13:39
  • any update or answer to this issue? I've run into the same problem. There is a binary in /usr/local/bin/convert prior to the imagemagick install. I think @AlexPopov question is the same as mine. What might have used this older version? Was it something bundled with OS X Mavericks? – DogEatDog Mar 06 '14 at 16:01
  • @DogEatDog - I think this question got answered in the comments. – Alexander Popov Mar 06 '14 at 17:15
  • I removed the /usr/local/bin/convert using the brew link --overwrite. No issues so far -- I won't really know until I try something else and see if it breaks. :-p – DogEatDog Mar 06 '14 at 18:43

1 Answers1

2

I had the same problem, and after a bit of investigation, I'm pretty sure that the existing /usr/local/bin/convert was installed with MacTeX, which I did not install through homebrew. Replacing it with the homebrew installed 'convert' worked fine - you might want to back up the existing files beforehand just in case though.

mistertim
  • 5,123
  • 4
  • 20
  • 27