Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am getting the following error when trying to install imagemagick via brew on OS X Mountain Lion. It appears to be a curl error - hence why it's on SF not another of the Stack Exchange sites.

brew install imagemagick
==> Installing imagemagick dependency: pkg-config
==> Downloading

curl: (7) couldn't connect to host
Error: Download failed:

Is it possible to pick an alternative download location when running the brew install imagemagick command?

Is this a known problem, I have searched for similar issues but none seem to be the same.

share|improve this question

2 Answers 2

up vote 8 down vote accepted

I was having this exact problem (today as well, found your post while searching for a result)

The following worked for me:

cd /Library/Caches/Homebrew
curl -O
brew install imagemagick

Basically Homebrew will not re-download a file that it has cached, so its just about downloading the file from somewhere else (finding it was the hard part)

share|improve this answer
Great, thanks! I was just in the process of trying to find that file aswell! You've saved me a chunk of wasted time. – dannymcc Aug 2 '12 at 11:16

I didn't have a /Homebrew folder in my /Library/Caches directory. I made one and got the file, but brew install graphviz still tried the old formula's URL.

I instead went to /usr/local/Library/Formula and edited the url property of pkg-config.rb to be that new URL from Stephen's answer.

This worked well, and then I did a brew update to reset the recipes.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.