Error installing rmagick: ERROR: Failed to build gem native extension

后端 未结 19 2716
眼角桃花
眼角桃花 2020-12-04 15:09

I am trying to run one project on my local machine. I installed Ruby and Rails on my Mac OS system. It is working properly. I can create a new project and can run it properl

相关标签:
19条回答
  • 2020-12-04 15:47

    Solution for Ubuntu:

    sudo apt-get install imagemagick

    ln -s /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick-config /usr/bin/Magick-config

    0 讨论(0)
  • 2020-12-04 15:50

    here's what i did on 16.04,

    sudo apt-get install libmagickwand-dev
    sudo apt-get install graphicsmagick-imagemagick-compat
    

    and then install gem like that

    PATH="/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16:$PATH" gem install rmagick -v '2.13.2'
    
    0 讨论(0)
  • 2020-12-04 15:50

    For Fedora 27 I resolved this problem:

    sudo dnf install ImageMagick-devel ImageMagick
    gem install rmagick
    
    0 讨论(0)
  • 2020-12-04 15:52

    For Ubuntu Server, I installed it by doing this:

    sudo apt-get install imagemagick
    
    sudo apt-get install libmagick++-dev
    
    sudo gem install rmagick -v '2.15.4'
    
    0 讨论(0)
  • 2020-12-04 15:52

    For mac users, install imagemagick 6 since the newest version 7 isn't compatible.

    brew install imagemagick@6
    gem install rmagick
    

    The above should work after you uninstall what you already have.

    0 讨论(0)
  • 2020-12-04 15:58

    For linux fedora, i got same error and fixed with below two commands:

    yum install ImageMagick
    
    gem install rmagick 
    

    For Centos install ImageMagick-devel package. using below commands:

    yum install ImageMagick-devel
    
    gem install rmagick
    

    Thanks.

    0 讨论(0)
提交回复
热议问题