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 imagemagi
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
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.
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
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
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.
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