RMagick安装错误

时间:2011-09-15 13:33:30

标签: ruby-on-rails ruby rmagick

一切!我在CentOS 5.5服务器上安装rmagick gem时遇到问题。当我发出命令时:

gem install rmagick

我得到了:

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.

我已经安装了正确版本的imagemagick,我在/ usr / local / bin中找到了Magick-config,我的PATH包含了该目录。但是,rmagick gem安装程序只是不搜索Magick-config的dir。我该怎么办?

顺便说一句,我有另一台CentOS 5机器成功安装ruby和rmagick,而后者在/ usr / local / bin中也有Magick-config文件。

4 个答案:

答案 0 :(得分:1)

你安装了Imagemagick吗?例如:

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

答案 1 :(得分:0)

请参阅这篇关于如何修复它的精彩文章。只需跳过最后3行,因为它们与PHP有关。

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

答案 2 :(得分:0)

这里是我在命令提示符中使用的推荐。请检查版本

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 

答案 3 :(得分:0)

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

sudo port install ImageMagick

sudo gem install rmagick