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

后端 未结 19 2714
眼角桃花
眼角桃花 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:59

    On Mac you can try this:

    $ brew unlink imagemagick
    $ brew install imagemagick@6 && brew link imagemagick@6 --force
    $ gem install rmagick 
    
    0 讨论(0)
  • 2020-12-04 15:59

    You need to run both the command for ubuntu

    sudo apt-get install libmagick++-dev
    sudo apt-get install imagemagick
    

    Then try to install

    gem install rmagick
    
    0 讨论(0)
  • 2020-12-04 16:00

    As per the error log it looks like "Magick-config" is missing. You need to install ImageMagik or GraphicsMagick. These are the commands you should follow which is taken from RMagik Documentation:

    1) Go to http://www.imagemagick.org or http://www.graphicsmagick.org and download the latest version of the software to a temporary directory. the extract them :
    
    - tar xvzf ImageMagick.tar.gz
    - cd ImageMagick-x.x.x
    
    - ./configure --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8
    
    - make
    - sudo make install
    
    - sudo gem install rmagick
    
    0 讨论(0)
  • 2020-12-04 16:05

    Just install ImageMagick-devel package and everything should be fine :)

    0 讨论(0)
  • 2020-12-04 16:06

    All here wrong for me :(

    this helped:

    sudo apt-get install libmagickwand-dev

    according to rmagick github page

    then bundle install went with no errors

    0 讨论(0)
  • 2020-12-04 16:07

    Just run these command

    • $ sudo apt-get install imagemagick
    • $ sudo apt-get install libmagick++-dev
    • $ sudo gem install rmagick
    • $ bundle install
    
    0 讨论(0)
提交回复
热议问题