3

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 http://pkgconfig.freedesktop.org/releases/pkg-config-0.27.tar.gz

curl: (7) couldn't connect to host
Error: Download failed: http://pkgconfig.freedesktop.org/releases/pkg-config-0.27.tar.gz

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.

dannymcc
  • 2,677
  • 10
  • 46
  • 72

2 Answers2

8

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 http://fossies.org/unix/privat/pkg-config-0.27.tar.gz
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)

Stephen
  • 315
  • 1
  • 5
  • 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 02 '12 at 11:16
1

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.

Alex Mcp
  • 111
  • 1