在 Ubuntu 上安装 Gosu 时出错

在 Ubuntu 上安装 Gosu 时出错

尝试在 Ubuntu 上安装 Gosu gem 时出现以下错误。我已经安装了依赖项。

错误信息如下:

compilation terminated.
Makefile:235: recipe for target 'TrueTypeFontUnix.o' failed
make: *** [TrueTypeFontUnix.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/nicolesano/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/gosu-0.14.5 for inspection.
Results logged to /home/nicolesano/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0-static/gosu-0.14.5/gem_make.out

答案1

我遇到了同样的问题,依赖项 wiki 中缺少一个包。只需运行sudo apt-get install libfontconfig1-dev然后重试gem install gosu

参考:https://github.com/gosu/gosu/issues/514

相关内容