RMagick install error

∥☆過路亽.° 提交于 2019-12-08 13:39:30

问题


all! I have a problem when installing rmagick gem on CentOS 5.5 server. When I issued command:

gem install rmagick

I got:

checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in /usr/bin:/bin

*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

I have installed imagemagick with correct version, and I find Magick-config in /usr/local/bin and my PATH includes that dir. However, the rmagick gem installer just does not search that dir for Magick-config. What should I do?

By the way, I have another CentOS 5 machine installing ruby and rmagick successfully, and the latter has the Magick-config file in /usr/local/bin, too.


回答1:


did you installed Imagemagick? eg:

yum  install gcc gcc-c++ ImageMagick-devel ghostscript freetype-devel \ 
libjpeg-devel libpng-devel libpng10-devel libwmf-devel libexif-devel \
libtiff-devel



回答2:


See this brilliant post on how to fix it. Just skip the last 3 lines as they are PHP related.

http://codercake.com/installing-imagemagick-6-6-9-7-and-imagick-for-php-on-centos-5-5-64-bit/#comment-39




回答3:


here the commend which I was used in my command prompt. Please check the version

gem install rmagick -v '2.13.1' --platform=ruby -- --with-opt-lib=C:/ImageMagick-6.8.7-Q8/lib --with-opt-include=C:/ImageMagick-6.8.7-Q8/include 



回答4:


On Mac High Sierra - 10.13.4 - https://www.imagemagick.org/script/download.php

sudo port install ImageMagick

sudo gem install rmagick



来源:https://stackoverflow.com/questions/7431707/rmagick-install-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!