我目前正在尝试在 Centos 6.6 机器上构建一个 Ruby 应用程序。通过软件集合安装了不同的 Ruby 堆栈。请注意我在机器上没有root,我的权限是有限的,特别是它们不包括包安装。
本机扩展不构建。它似乎ruby-devel
丢失了,但管理员告诉我,它已为两个堆栈正确安装:
dnf install rh-ruby22-ruby-devel.x86_64 ruby193-ruby-devel.x86_64 -y
这是我的问题:
bob@server ~> scl enable rh-ruby22 bash
bash-4.1$ ruby -v
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux-gnu]
bash-4.1$ gem install json Building native extensions. This could take a while... ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/opt/rh/rh-ruby22/root/usr/bin/ruby -r ./siteconf20150625-17536-saskmd.rb extconf.rb mkmf.rb can't find header files for ruby at /opt/rh/rh-ruby22/root/usr/share/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in ~/.gem/ruby/gems/json-1.8.3 for inspection. Results logged to ~/.gem/ruby/extensions/x86_64-linux/json-1.8.3/gem_make.out
如何检查ruby-devel
(更准确地说,rh-ruby22-ruby-devel.x86_64
)是否正确安装?
如果它按预期工作,下一个要搜索的地方是什么?