How do I install imagemagick with homebrew?
Asked Answered
I

6

236

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.
Inseparable answered 13/8, 2011 at 23:41 Comment(8)
You need to brew update; we're using a different mirror for ImageMagick now, and the adamv one is gone.Comstock
I did brew update already. It's already up-to-date.Inseparable
You may have to update manually, we have been having issues lately: github.com/mxcl/homebrew/…Comstock
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.Gaitan
Using the script mentioned there solved. Thank you!Inseparable
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/.gitPhotometry
I got it working following the instructions at the and of this page: github.com/mxcl/homebrew/issues/6994Photometry
@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.Huertas
C
99

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.

Coinstantaneous answered 13/9, 2011 at 19:11 Comment(4)
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.Merilyn
where is the executable?Triforium
sudo chown $(whoami) /usr/local , cd /usr/local , git reset --hard FETCH_HEAD , brew install imagemagick , This works for me today.Heng
@Triforium 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/magickBotsford
R
209

You could try:

brew update && brew install imagemagick

Rent answered 9/1, 2015 at 14:37 Comment(2)
this worked for me perfectly on mac os 10.11.1 El CapitanMarking
Note that brew upgrade upgrades everything in homebrew.Reticule
C
99

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.

Coinstantaneous answered 13/9, 2011 at 19:11 Comment(4)
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.Merilyn
where is the executable?Triforium
sudo chown $(whoami) /usr/local , cd /usr/local , git reset --hard FETCH_HEAD , brew install imagemagick , This works for me today.Heng
@Triforium 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/magickBotsford
C
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
Cob answered 26/5, 2016 at 9:53 Comment(1)
ghostscript is automatic installed as dependencyLenora
H
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.

Hellbox answered 3/3, 2020 at 22:46 Comment(0)
N
1

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

Nauplius answered 15/4, 2021 at 17:30 Comment(0)
L
-20

You could do:

brew reinstall php55-imagick

Where php55 is your PHP version.

Limburger answered 15/7, 2014 at 23:38 Comment(1)
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.Intracardiac

© 2022 - 2024 — McMap. All rights reserved.