Can't install imagemagick with brew on Mac OS X mavericks

后端 未结 7 2089
星月不相逢
星月不相逢 2021-02-02 07:54

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         


        
相关标签:
7条回答
  • 2021-02-02 08:27

    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

    0 讨论(0)
  • 2021-02-02 08:27

    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.

    0 讨论(0)
  • 2021-02-02 08:29

    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

    0 讨论(0)
  • 2021-02-02 08:32

    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

    0 讨论(0)
  • 2021-02-02 08:39

    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.

    0 讨论(0)
  • 2021-02-02 08:45

    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
    
    0 讨论(0)
提交回复
热议问题