首页 > 代码库 > Centos6.5安装rmagick遇到checking for magick-config .. no问题

Centos6.5安装rmagick遇到checking for magick-config .. no问题


Centos6.5安装rmagick

1安装rmagick

#gem install rmagick
遇到了异常:

ERROR:  Error installing rmagick-2.13.1.gem:
	ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
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/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/liyongkuan/bin

原因是要需要依赖这个:ImageMagick,及其库文件,ImageMagick-devel

#安装ImageMagick(要大写否则检测不到)

#yum install ImageMagick
#yum install ImageMagick-devel

然后再安装rmagick

#gem install rmagick

提示:Successfully  install rmagick-2.13.1
1gem instal


OK,安装成功。