我正在尝试在我的Ubuntu计算机上安装Gosu。要安装宝石,我已经尝试过" gem install gosu"但是我收到一条错误消息,我无法弄清楚......它说它"无法构建gem原生扩展"。
任何人都知道我能做什么? 我是Ruby的新手,所以可能需要对RVM做些什么..?我不确定。
以下是完整的错误消息:
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
答案 0 :(得分:0)
执行此操作
&#xA;&#xA;步骤1:
&#xA;&#xA; sudo apt-get install build-essential libsdl2 -dev libsdl2-ttf-dev libpango1.0-dev \&#xA; libgl1-mesa-dev libopenal-dev libsndfile-dev libmpg123-dev&#xA;
&#xA;&#xA; Step2:
&#xA;&#xA; sudo apt-get install ruby-dev&#xA;
&#xA;&#xA; 第3步:
&#xA;&#xA ; gem install gosu&#xA;
&#xA;