我正在尝试在 Solaris 10 机器上安装 Ruby on Rails。我设法从源代码构建了 Ruby 1.9.3 并安装了 gems,但是当我每次收到此消息时运行 gem 命令时:
# gem list
/usr/local/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
这真的很烦人:)
所以我尝试重建 Ruby,这是我在 make 的输出中注意到的。
configuring psych
libyaml is missing. Please install libyaml.
Failed to configure psych. It will not be installed.
我找到了检查它的 extconf.rb 脚本,并尝试手动运行它:
# pwd
/root/pub/ruby-1.9.3-p194/ext/psych
#
# irb --simple-prompt
>> require 'mkmf'
=> true
>> find_header 'yaml.h'
checking for yaml.h... yes
=> true
>> find_library 'yaml', 'yaml_get_version'
checking for yaml_get_version() in -lyaml... yes
=> true
>> exit
显然 extconf.rb 可以找到 libyaml 但 make 不能。所以我很困惑为什么make找不到它。有什么想法吗?