Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to 'brew link' imagemagick

I'm trying to install Imagemagick via brew, and I get this message upon installation:

    Warning: imagemagick-6.8.6-3 already installed, it's just not linked

When I attempt to link it via brew link, I get this:

    brew link imagemagick
    Warning: Could not link imagemagick. Unlinking...
    Linking /usr/local/Cellar/imagemagick/6.8.6-3... 
    Error: File exists - /usr/local/etc

Ideas?? I've tried:

    'brew link -f imagemagick' 

without luck (I get the same error message as above). It was suggested here: Brew linking with ImageMagick

According to brew update, I'm up to date. Brew doctor returns this:

    Warning: You have MacPorts or Fink installed:
    /Users/user_name/.rvm/bin/port, /opt/local/bin/port

    This can cause trouble. You don't have to uninstall them, but you may want to
    temporarily move them out of the way, e.g.

    sudo mv /opt/local ~/macports

   Warning: You have unlinked kegs in your Cellar
   Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
   those kegs to fail to run properly once built. Run `brew link` on these:

   imagemagick
like image 477
user2761669 Avatar asked Sep 09 '13 14:09

user2761669


1 Answers

You need to remove the imagemagick file in /usr/local/etc so that brew can write a new one there.

The old file was placed there by something else than brew. Possibly another package manager.

UPDATE 2015.03.07: as Chords indicated in a comment above it may be necessary to remove the folder entirely. (Although setting the correct permissions and groups may be an equivalent measure.)

like image 192
froderik Avatar answered Nov 15 '22 05:11

froderik