Unable to install gosu ubuntu gem

I am trying to install Gosu on my Ubuntu computer. To install gem, I tried "gem install gosu", but I get an error message that I can’t understand .. It says "Failed to create your own gem extension."

Does anyone know what I can do? I'm new to Ruby, so I might need to do something with RVM ..? I'm not sure.

Here is the complete error message:

Fetching: gosu-0.8.6.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing gosu:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.9.1 extconf.rb
The Gosu gem requires some libraries to be installed system-wide.
See the following site for a list:
/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:63:in `<main>'
https://github.com/jlnr/gosu/wiki/Getting-Started-on-Linux

Gem files will remain installed in /var/lib/gems/1.9.1/gems/gosu-0.8.6 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/gosu-0.8.6/ext/gosu/gem_make.out
+4
source share
1 answer

Do it

Step 1:

sudo apt-get install build-essential libsdl2-dev libsdl2-ttf-dev libpango1.0-dev \
                 libgl1-mesa-dev libopenal-dev libsndfile-dev libmpg123-dev

Step 2:

sudo apt-get install ruby-dev

Step 3:

gem install gosu
0
source

All Articles