3
我在Amazon EC2實例上運行ubuntu 14.04.3 LTS。任何幫助解決這個錯誤將不勝感激。在ubuntu上安裝mongo gem時出錯
鍵入sudo gem install mongo
產生如下:
Fetching: bson-3.2.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing mongo:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:1:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/bson-3.2.1 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/bson-3.2.1/ext/bson/gem_make.out
看看這個問題; http://stackoverflow.com/questions/7645918/require-no-such-file-to-load-mkmf-loaderror – Christian
正如在你發佈的鏈接的答案中指出的,運行sudo apt-get install ruby-dev修復了錯誤。非常感謝。如果您發佈答案,我會接受它 – Dsel