gpt4 book ai didi

ruby-on-rails - ruby compass 错误 : Failed to build gem native extension

转载 作者:数据小太阳 更新时间:2023-10-29 08:18:17 26 4
gpt4 key购买 nike

您好,我正在运行 Ubuntu 15.04,我正在尝试安装 Compass gem。我像 Compass 网站告诉我的那样进行了 gem 更新。然后我尝试安装 Compass 并收到以下错误。

Building native extensions.  This could take a while...
ERROR: Error installing compass:
ERROR: Failed to build gem native extension.

/usr/bin/ruby2.1 -r ./siteconf20150609-16406-5iavn8.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.1.0/gems/ffi-1.9.8 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86-linux/2.1.0/ffi-1.9.8/gem_make.out

这是 gem_make.out 文件的输出

/usr/bin/ruby2.1 -r ./siteconf20150609-16446-49gin0.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

此时不确定要做什么。谢谢!

最佳答案

mkmf.rb can't find header files for ruby at

您需要 ruby​​ 开发头文件来编译 gems。

您需要软件包 ruby2.1-dev

您可能还需要其他软件包,例如 build-essential

尝试以下操作:

sudo apt-get install ruby2.1-dev build-essential

在 14.04 等早期版本的 Ubuntu 上,您将需要 ruby2.0-dev 包。

sudo apt-get install ruby2.0-dev build-essential

关于ruby-on-rails - ruby compass 错误 : Failed to build gem native extension,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30745982/

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