Error attempting to install using gem: cannot load Such file-mkmf (LoadError)

Asked 2 years ago, Updated 2 years ago, 92 views

Now that Sphero can be moved from Scratch, even children can program

I tried to connect Scratch 1.4 installed on Sphero and Ubuntu, so I ran the command with reference to the blog article above, but I got an error.Please tell me how to resolve it.

Command executed

 sudogem install hybridgroup-serialport

error message

Fetching: hybridgroup-serialport-1.2.1.gem (100%)
Building native extensions. This could take a while...
ERROR:Error installing hybridgroup-serialport:
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 soch 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/hybridgroup-serialport-1.2.1 for inspection.
Results logged to/var/lib/gems/1.9.1/gems/hybridgroup-serialport-1.2.1/ext/native/gem_make.out

Environment: Ubuntu 14.04

ubuntu rubygems

2022-09-30 17:54

1 Answers

Refer to the blog post below, first install the ruby-dev package, and then
The installation was successful by executing the gem command mentioned in the question.

reference:
Install ruby-dev if mkmf is not present

$sudo apt-get install ruby-dev

This post was posted as a community wiki based on @takashin10's comments.


2022-09-30 17:54

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.