我在安裝在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