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
?
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.