Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing mongo gem on ubuntu

I am running ubuntu 14.04.3 LTS on an Amazon EC2 instance. Any help resolving this error would be much appreciated.

Typing sudo gem install mongo yields the following:

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
like image 502
Dsel Avatar asked Dec 13 '25 17:12

Dsel


1 Answers

Another question - `require': no such file to load -- mkmf (LoadError) - has an answer which should fix the problem for you;

sudo apt-get install ruby1.9.1-dev

sudo apt-get install ruby-dev
like image 127
Christian Avatar answered Dec 16 '25 17:12

Christian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!