我在安装在CentOS 5的RMagick rubygem问题,我已经跟着http://rmagick.rubyforge.org/install2-linux.html的详细步骤,但是当我尝试:问题在CentOS安装RMagick rubygem 5
sudo gem install rmagick
结果是:
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/usr/local/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.11.0. 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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/rmagick-2.11.0 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/rmagick-2.11.0/ext/RMagick/gem_make.out
目录/ usr/local/bin包含Magick-config,但我一直没有能够让rubygems看到那里。我试过以下,但结果是相同的:
sudo gem install rmagick -- --with-opt-dir=/usr/local/bin
任何意见,将不胜感激。
字体链接似乎不起作用,所以我按照http://www.go2linux.org/msttcorefonts-true-type-fonts-on-linux上的说明来安装字体。像魅力一样工作。 – 2010-03-25 00:54:54
最后一步失败了,直到我添加了ruby头文件:sudo yum install ruby-devel – mveerman 2010-04-20 21:48:22
为我工作,谢谢Keith&Beerlington。其实我遇到了更多的问题,Zend Server CE已经安装了一个不同版本的ImageMagick(没有devel,所以不能gem inst rmagick)在我的系统上。为了解决这个问题,我需要将LD_LIBRARY_PATH env变量正确设置为/ usr/lib(而不是ZSCE位置)并将其传递给apache。为了与乘客做到这一点,我已经将我的apache指令“PassengerRuby/usr/bin/ruby”转换为“PassengerRuby/usr/bin/ruby_env”并填充此文件: #!/ bin/sh export LD_LIBRARY_PATH =/usr/lib: exec“/ usr/local/bin/ruby”“$ @” – maraspin 2010-06-15 21:03:57