How to Install Gem - Failed to Build Gem Native Extension - Cannot Load Such File -- Mkmf (Loaderror)

Unable to install gem - Failed to build gem native extension - cannot load such file -- mkmf (LoadError)

There are similar questions:

  • `require': no such file to load -- mkmf (LoadError)
  • Failed to build gem native extension (mkmf (LoadError)) - Ubuntu 12.04

Usually, the solution is:

sudo apt-get install ruby-dev

Or, if that doesn't work, depending on your ruby version, run something like:

sudo apt-get install ruby1.9.1-dev

Should fix your problem.


Still not working? Try the following after installing ruby-dev:

sudo apt-get install make

Failed to build gem native extension (mkmf (LoadError)) - Ubuntu 12.04

Possible duplicate of:

Unable to install gem - Failed to build gem native extension - cannot load such file -- mkmf (LoadError)

Depending on your ruby version, run:

sudo apt-get install ruby1.9.1-dev

What are the useful new ASP.NET features in the .NET Framework 3.5?

For ASP.NET, you have a lot of improvements:

  • split view (code and design)
  • faster switching between code and design view
  • embedded master pages (one master page in another)
  • javascript debugging

Anyway most of the useful stuff are really in the meat of the language, and for .NET 3.5 the new language features for C# 3.0 will be (and yes, I find ALL of them useful)

  • anonymous objects
  • automatic properties
  • object initializers
  • collection initializers (inline initialization for collections)
  • implicit typing (var keyword)
  • lambda expressions
  • LINQ
  • Extension methods

I might have forgotten a few, but I think this is about most of the new cool and useful stuff.

ERROR: Failed to build gem native extension message (Linux) installing rubygems

So running this worked for me:

sudo apt-get install ruby1.9.1-dev

Suppose the -dev package was needed?

Error installing gem failed to build gem native extensions -- cannot load such file -- mkmf

if you're using RVM, you shouldn't ever be using 'sudo'. Using sudo calls libs and such out of the rvm path. Try just a flat

gem install thin

and see if that helps.

~Kevin

Can't install rails 3.2.9: Failed to build gem native extension

Possible duplicate of:

  • Unable to install gem - Failed to build gem native extension - cannot load such file -- mkmf (LoadError)
  • `require': no such file to load -- mkmf (LoadError)

Depending on your ruby version, run:

sudo apt-get install ruby1.9.1-dev

ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension

Run following command

 brew cleanup -d -v 

Then run below command

brew install cocoapods 

Note: If you see failed to link then run brew link cocoapods

If linking is getting failed then run

brew link --overwrite cocoapods

This is how it get solved for me

For someone who is having m1 chip system they need to run this via Rosetta

select Terminal and press cmd(⌘)+I and check the "Open using Rosetta" option. ( For m1 chip based mac )

`require': no such file to load -- mkmf (LoadError)

After some search for a solution it turns out the -dev package is needed, not just ruby1.8. So if you have ruby1.9.1 doing

sudo apt-get install ruby1.9.1-dev

or to install generic ruby version, use (as per @lamplightdev comment):

sudo apt-get install ruby-dev

should fix it.

Try locate mkmf to see if the file is actually there.



Related Topics



Leave a reply



Submit