Reputation: 788
I am trying to install Gosu on my Ubuntu computer. To install the gem i have tried "gem install gosu" but I am getting an Error message I cannot figure out.. It says it "Failed to build gem native extension".
Anyone know what I can do? I am kinda new to Ruby so it might have to do something with the RVM..? Im not sure.
Here is the full 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
Upvotes: 4
Views: 1851
Reputation: 61
Do this
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
Step2:
sudo apt-get install ruby-dev
Step 3:
gem install gosu
Upvotes: 2