请问这个该怎么解决? gem install rmgick -v '2.13.1' ERROR: Could not find a valid gem 'rmgick' (= 2.13.1) in any repository ERROR: Possible alternatives: rmagick, rmilk
[打错了...rmagick,但事后还有点问题,自己搜去了...谢谢帮助]
@Rei 请教 root@SNDA-192-168-1-95:~# gem install rmagick -v '2.13.1' Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb checking for Ruby version >= 1.8.5... yes extconf.rb:128: Use RbConfig instead of obsolete and deprecated Config. checking for gcc... yes checking for Magick-config... no Can't install RMagick 2.13.1. Can't find Magick-config in /usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
*** 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 --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/rvm/rubies/ruby-1.9.3-p194/bin/ruby
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rmagick-2.13.1 for inspection. Results logged to /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
由于国内网络原因(你懂的),导致 rubygems.org 存放在 Amazon S3 上面的资源文件间歇性连接失败。所以你会与遇到 gem install foo 或 bundle install 的时候半天没有响应....
@lgn21st 我貌似已经用了 taobao 的源了... root@SNDA-192-168-1-95:~# gem sources -l *** CURRENT SOURCES ***
猜测:imagemagick
这个开发包装了没有?如:
ubuntu: apt-get install imagemagick
假设你使用 .rvm
。
如果你在安装 ruby : rvm install 1.9.3
之前没有安装 wiki
里的各种包,
那么你需要在安装那些依赖包后在重新安装一次 ruby
@skandhas 那就是同一类的问题吧,mysql,我在 mac 上没安好,换了 ubantu,先装好了 mysql,再安装 native gem,那个应该算解决了.thx~