gem install rmagick
给我:
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
checking for gcc... yes
checking for Magick-config... yes
*** 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}/lib64
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby
extconf.rb:189:in ``': No such file or directory - which (Errno::ENOENT)
from extconf.rb:189:in `has_graphicsmagick_libmagick_dev_compat?'
from extconf.rb:66:in `configure_compile_options'
from extconf.rb:16:in `initialize'
from extconf.rb:548:in `new'
from extconf.rb:548:in `<main>'
Gem files will remain installed in /home/redmine/.gem/ruby/gems/rmagick-2.16.0 for inspection.
Results logged to /home/redmine/.gem/ruby/gems/rmagick-2.16.0/ext/RMagick/gem_make.out
我有 ImageMagick 和 ImageMagick-devel 包。有没有办法找到我缺少哪个包?
cat /home/redmine/.gem/ruby/gems/rmagick-2.16.0/ext/
/usr/bin/ruby extconf.rb
checking for gcc... yes
checking for Magick-config... yes
*** 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}/lib64
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby
extconf.rb:189:in ``': No such file or directory - which (Errno::ENOENT)
from extconf.rb:189:in `has_graphicsmagick_libmagick_dev_compat?'
from extconf.rb:66:in `configure_compile_options'
from extconf.rb:16:in `initialize'
from extconf.rb:548:in `new'
from extconf.rb:548:in `<main>'
答案1
错误输出表明您的服务器缺少名为 的程序which
。请尝试安装此程序。
yum install which