【问题标题】:Installing libyaml for ruby on a mac osX (Lion)在 mac osX (Lion) 上为 ruby​​ 安装 libyaml
【发布时间】:2012-05-01 01:26:25
【问题描述】:

我收到此错误消息:

"It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby."

我试过输入这个命令:rvm pkg install libyaml

我收到此错误消息:

"Fetching yaml-0.1.4.tar.gz to /Users/luke/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/luke/.rvm/src
Error running 'tar xmzf /Users/luke/.rvm/archives/yaml-0.1.4.tar.gz -C
/Users/luke/.rvm/src ', 
   please read /Users/luke/.rvm/log/yaml/extract.log
Configuring yaml in /Users/luke/.rvm/src/yaml-0.1.4.
Error running ' ./configure --prefix="/Users/luke/.rvm/usr"  ', 
   please read /Users/luke/.rvm/log/yaml/configure.log
Compiling yaml in /Users/luke/.rvm/src/yaml-0.1.4.
Error running 'make ', please read /Users/luke/.rvm/log/yaml/make.log

Database file /Users/luke/.rvm/config/packages does not exist."

有谁知道我做错了什么?谢谢!

【问题讨论】:

  • 您是否按照错误消息的指示阅读了 extract.log 和 configure.log?也许将内容发布到 gist (gist.github.com)。
  • 我没有。现在读那个。谢谢!
  • gist.github.com/2640638 这是我打开 extract.log 时得到的。感谢您的帮助!

标签: ruby macos psych


【解决方案1】:

当前版本 [是] LibYAML:0.1.4 (2011-05-30) [在 2012 年我回答这个问题时]。

下载源码包:http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz.

要构建和安装 LibYAML,运行

  • $tar zxf yaml-0.1.4.tar.gz
  • $cd yaml-0.1.4
  • $ ./configure
  • $ make
  • $ make install

    或者只是:

    $brew install libyaml

    接下来, $brew install ruby

    祝你好运。

  • 【讨论】:

    • 我在“./configure”步骤之后得到了这个:make all-recursive make all in include make[2]: Nothing to be done for all'. Making all in src make[2]: Nothing to be done for all'。全力以赴。在测试中进行所有操作 make[2]:对于 all'. Making all in win32 make[2]: Nothing to be done for all' 无事可做。 luke$ 另外,我不确定这是否重要,但 $brew install ruby​​ 似乎对我不起作用。我正在使用 rvm 重新安装它。我真的很感谢你的帮助!谢谢!
    【解决方案2】:

    这对我有用:

    【讨论】:

      【解决方案3】:

      试试这个...

      打开一个新的终端窗口并:

      cd .rvm/src
      sudo rm -rf yaml*
      

      (提供您的凭据)

      cd ~
      rvm pkg install libyaml
      

      【讨论】:

      • rvm package install libyaml 用于 rvm 1.6.4
      【解决方案4】:

      使用 rvm for mac osx 安装 ruby​​,使用 autolibs 安装 libyaml 并首先卸载 libyaml 会有所帮助。

      这对我有用:

      brew uninstall libyaml
      rvm autolibs enable
      rvm reinstall ruby-2.1.1
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2013-04-13
        • 1970-01-01
        • 1970-01-01
        • 2012-08-08
        • 1970-01-01
        • 1970-01-01
        • 2012-03-22
        • 1970-01-01
        相关资源
        最近更新 更多