Reputation: 855
I am using Homebrew v0.9.5 on my Mac OS X version 10.9.4
When I run the command: `brew install imagemagick, this error occurred.
$ brew install imagemagick
==> Installing dependencies for imagemagick: libpng, freetype
==> Installing imagemagick dependency: libpng
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libpng-1.6.12.mavericks.bottle.tar.gz
curl: (7) Failed connect to downloads.sf.net:443; Operation timed out
Error: Failed to download resource "libpng"
Download failed: https://downloads.sf.net/project/machomebrew/Bottles/libpng-1.6.12.mavericks.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading https://downloads.sf.net/project/libpng/libpng16/1.6.12/libpng-1.6.12.tar.gz
curl: (7) Failed connect to downloads.sf.net:443; Operation timed out
Error: Failed to download resource "libpng"
Download failed: https://downloads.sf.net/project/libpng/libpng16/1.6.12/libpng-1.6.12.tar.gz
I have added --disable-openmp option, it also doesn't go well.
$ brew install imagemagick --disable-openmp
brew doctor command result has no problem.
$ brew doctor
Your system is ready to brew.
Upvotes: 34
Views: 30671
Reputation: 25331
If you are an Anaconda/Miniconda user on Mac OSX or Linux, you can install packages like imagemagick
using conda
.
conda install -c conda-forge imagemagick
https://anaconda.org/conda-forge/imagemagick
Upvotes: 0
Reputation: 6136
Follow this:
brew install imagemagick@6
Add below lines in to ~/.bash_profile file
export LDFLAGS="-L/usr/local/opt/imagemagick@6/lib" export
CPPFLAGS="-I/usr/local/opt/imagemagick@6/include" export
PKG_CONFIG_PATH="/usr/local/opt/imagemagick@6/lib/pkgconfig"
Install Rmagick
source ~/.bash_profile
gem install rmagick
Upvotes: 0
Reputation: 79
For me it was upgrading to El Capitan. I found the simplest solution was to force remove homebrew:
sudo ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
then to re-install it:
sudo /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
then install imageMajick:
brew install ImageMagick
Depending on your setup you may not want to sudo. For me, its fine. Enjoy a snack while you manipulate images.
Upvotes: 4
Reputation: 877
In my case the url was simply not correct, with which homebrew wanted to download the required file. I looked it up here http://sourceforge.net/projects/libpng/files/libpng16/older-releases/1.6.16/ by myself and copied it to /Library/Caches/Homebrew
like @Dan suggested.
I then run brew install libpng
again and it worked.
Upvotes: 2
Reputation: 3756
This problem also occurs because https://downloads.sf.net/project/libpng/libpng16/1.6.16/libpng-1.6.16.tar.xz has a badly configured SSL certificate. Open the link in your browser and see if your browser complains.
If that's the case, you can manually download the file to /Library/Caches/Homebrew and run again.
Source: https://github.com/Homebrew/homebrew/issues/36703
Upvotes: 5
Reputation: 11072
I'm not certain whether the source of my problem was the same as the OP's, however (though this has an accepted answer already) I'll post this in case this solution works for others.
Using brew install imagemagick
, I would encounter the following error:
curl: (52) Empty reply from server Error: Failed to download resource "libpng" Download failed: https://downloads.sf.net/project/libpng/libpng16/1.6.16/libpng-1.6.16.tar.xz
Which is similar, if less specific than the OP's message.
As it turned out, I already had a previous version of libpng
installed (version 1.5.7). I then ran:
brew upgrade libpng
Followed by another brew install libpng
, and this time it succeeded, as it now had the correct version needed.
Upvotes: 5
Reputation: 28245
Have you tried a
$ brew update
$ brew install imagemagick --disable-openmp --build-from-source
Apparently that seemed to fix it for me on Mac OS 10.8 (Mountain Lion). Previously I checked out the latest imagemagick brew recipe with "brew versions imagemagick" and "git checkout e68e443", see here and here
Upvotes: 61