gpt4 book ai didi

ruby - 无法安装 gem Gosu Ubuntu

转载 作者:数据小太阳 更新时间:2023-10-29 07:39:16 31 4
gpt4 key购买 nike

我正在尝试在我的 Ubuntu 计算机上安装 Gosu。为了安装 gem,我尝试了“gem install gosu”,但我收到一条我无法理解的错误消息。它说“无法构建 gem native 扩展”。

有人知道我能做什么吗?我对 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

最佳答案

这样做

第一步:

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

第二步:

sudo apt-get install ruby-dev

第 3 步:

gem install gosu

关于ruby - 无法安装 gem Gosu Ubuntu,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27952413/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com