Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Brew linking with ImageMagick

Installing: ostaptan:~ ostap$ brew install imagemagick --disable-openmp --from-source

==> Downloading http://downloads.sf.net/project/machomebrew/mirror/ImageMagick-6.7.7-6.tar.bz2
Already downloaded: /Library/Caches/Homebrew/imagemagick-6.7.7-6.tar.bz2
==> Patching
patching file configure
Hunk #1 succeeded at 32371 (offset 447 lines).
==> ./configure --disable-osx-universal-binary --without-perl --prefix=/usr/local/Cellar/imagemagick/6.7.7-6 --enable-shared --disable-static
==> make install
Error: The linking step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link imagemagick'
==> Summary
/usr/local/Cellar/imagemagick/6.7.7-6: 1388 files, 32M, built in 61 seconds

linking after bad linking in install:

ostaptan:wand ostap$ brew link imagemagick

Linking /usr/local/Cellar/imagemagick/6.7.7-6...

Error: Could not symlink file: /usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick/wand/wand-view.h

Target /usr/local/include/ImageMagick/wand/wand-view.h already exists. You may need to delete it.

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

To list all files that would be deleted:
  brew link -n formula_name

How to link??? what to do?? Can't find answers anywhere!

like image 798
Ostap Tan Avatar asked Aug 09 '12 07:08

Ostap Tan


People also ask

Where is ImageMagick installed on Mac?

If ImageMagick is installed via MacPorts, then the convert command lives in /opt/local/bin/. It is this directory that needs to get on the PATH environment variable.

Where is imagick installed?

By default, ImageMagick is installs binaries in /../usr/local/bin , libraries in /../usr/local/lib , header files in /../usr/local/include and documentation in /../usr/local/share . You can specify an alternative installation prefix other than /../usr/local by giving configure the option --prefix=PATH .


2 Answers

As suggested in the brew link output, try

brew link -f imagemagick

This should clean up old links in /usr/local/include/ImageMagick/, and then link the files required to complete the installation.

If this doesn't work check that your user has permission to write to /usr/local/include/ImageMagick/*.

like image 200
jstr Avatar answered Oct 25 '22 16:10

jstr


After hours and hours of trying the only thing that worked for me was:

sudo brew link --overwrite imagemagick

(Also requires /usr/local/bin/brew to be chowned to root)

like image 21
Justin Vincent Avatar answered Oct 25 '22 16:10

Justin Vincent