234

I'm trying to install Imagemagick on OSX Lion but something is not working as expected.

-> brew install imagemagick

/usr/local/git/bin/git
==> Cloning https://github.com/adamv/ImageMagick.git
Cloning into /Users/klebershimabuku/Library/Caches/Homebrew/imagemagick--git...
fatal: https://github.com/adamv/ImageMagick.git/info/refs not found: did you run git      update-server-info on the server?
Error: Failure while executing: git clone --depth 1 https://github.com/adamv/ImageMagick.git /Users/kleber/Library/Caches/Homebrew/imagemagick--git

brew doctor says:

-> brew doctor
We couldn't detect gcc 4.0.x. Some formulae require this compiler.

Some "config" scripts were found in your path, but not in system or Homebrew folders.

`./configure` scripts often look for *-config scripts to determine if software packagesare installed, and what additional flags to use when compiling and linking.

Having additional scripts in your path can confuse software installed via Homebrew if the config script overrides a system or Homebrew provided script of the same name.

/Users/kleber/.rvm/gems/ruby-1.9.2-p180@global/bin
passenger-config

Setting DYLD_LIBARY_PATH can break dynamic linking.
You should probably unset it.

And yes, I have XCode 4.1 installed and running.

-> brew update
From http://github.com/mxcl/homebrew
* branch            master     -> FETCH_HEAD
Already up-to-date.
Ben
  • 1,525
  • 11
  • 19
Kleber S.
  • 8,110
  • 6
  • 43
  • 69
  • 6
    You need to `brew update`; we're using a different mirror for ImageMagick now, and the adamv one is gone. – Adam Vandenberg Aug 13 '11 at 23:44
  • 1
    I did brew update already. It's already up-to-date. – Kleber S. Aug 13 '11 at 23:46
  • 2
    You may have to update manually, we have been having issues lately: https://github.com/mxcl/homebrew/issues?labels=update-install-issue&sort=updated&direction=desc&state=open&page=1 – Adam Vandenberg Aug 13 '11 at 23:47
  • Using the script mentioned there solved. Thank you! – Kleber S. Aug 14 '11 at 01:57
  • What script is that exactly? That link points to issues labeled "update-install-issue" and I cannot find a specific force-update script... I'm hesitant to use the script by user478798 (below) since I rather not touch /usr/local/.git – davidhund Aug 18 '11 at 12:41
  • I got it working following the instructions at the and of this page: https://github.com/mxcl/homebrew/issues/6994 – davidhund Aug 18 '11 at 12:51
  • @davidhund: i used the script listed in the top answer and it worked great. You don't loose track of packages installed by homebrew in the process. – dmkc Aug 18 '11 at 16:42
  • Did you reinstall xcode after upgrading to Lion? If you had it installed before hand, that install no longer works. I had the same issue, though not with imagemagick. – Travis Aug 13 '11 at 23:49

6 Answers6

204

You could try:

brew update && brew install imagemagick

user664833
  • 18,397
  • 19
  • 91
  • 140
davarisg
  • 2,495
  • 2
  • 16
  • 9
98

The quickest fix for me was doing the following:

cd /usr/local
git reset --hard FETCH_HEAD

Then I retried brew install imagemagick and it correctly pulled the package from the new mirror, instead of adamv.

If that does not work, ensure that /Library/Caches/Homebrew does not contain any imagemagick files or folders. Delete them if it does.

Alex Lockwood
  • 83,063
  • 39
  • 206
  • 250
Marc L
  • 2,064
  • 1
  • 19
  • 12
  • 1
    This won't work anymore today. If you get the issue now, that's because you're trying to install an older version that relies on a now-defunct repo. – MattiSG Oct 31 '13 at 16:15
  • 3
    where is the executable? – chovy May 30 '14 at 06:09
  • sudo chown $(whoami) /usr/local , cd /usr/local , git reset --hard FETCH_HEAD , brew install imagemagick , This works for me today. – Nam Nguyen Dec 28 '16 at 03:32
  • 5
    @chovy on a Mac, the executable is called "magick" and will be symlinked at /usr/local/bin/magick to somewhere like /usr/local/Cellar/imagemagick/7.0.8-8/bin/magick – Kevin Hutchinson Jul 31 '18 at 11:38
78
brew install imagemagick

Don't forget to install also gs which is a dependency if you want to convert pdf to images for example :

brew install ghostscript
Abdennour TOUMI
  • 87,526
  • 38
  • 249
  • 254
8

Answering old thread here (and a bit off-topic) because it's what I found when I was searching how to install Image Magick on Mac OS to run on the local webserver. It's not enough to brew install Imagemagick. You have to also PECL install it so the PHP module is loaded.

From this SO answer:

brew install php
brew install imagemagick
brew install pkg-config
pecl install imagick

And you may need to sudo apachectl restart. Then check your phpinfo() within a simple php script running on your web server.

If it's still not there, you probably have an issue with running multiple versions of PHP on the same Mac (one through the command line, one through your web server). It's beyond the scope of this answer to resolve that issue, but there are some good options out there.

Tom Auger
  • 19,421
  • 22
  • 81
  • 104
1

Got a similar error and fixed by running brew update before brew install imagemagick

cancerbero
  • 6,799
  • 1
  • 32
  • 24
-20

You could do:

brew reinstall php55-imagick

Where php55 is your PHP version.

Oscar Salguero
  • 10,275
  • 5
  • 49
  • 48
  • 8
    Not an answer to the question, but it helped me. I just wanted to know the name of the PHP ImageMagick formula and a search engine lead me here. – Glutexo Mar 03 '16 at 09:47