macos 在 mac osX (Lion) 上为 ruby​​ 安装 libyaml

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10392495/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 09:08:45  来源:igfitidea点击:

Installing libyaml for ruby on a mac osX (Lion)

rubymacospsych

提问by Luke Bessey

I am getting this error message:

我收到此错误消息:

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

I have tried entering this command: rvm pkg install libyaml

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

and I am getting this error message:

我收到此错误消息:

"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."

Does anyone know what I am doing wrong? Thanks!

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

采纳答案by davesbrain

Try this...

试试这个...

Open a new terminal window and:

打开一个新的终端窗口,然后:

cd .rvm/src
sudo rm -rf yaml*

(supply your credentials)

(提供您的凭据)

cd ~
rvm pkg install libyaml

回答by boulder_ruby

The current release [was] LibYAML: 0.1.4 (2011-05-30)[in 2012 when I answered this question].

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

Download the source package: http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz.

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

To build and install LibYAML, run

要构建和安装 LibYAML,请运行

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

    OR just:

    $brew install libyaml

    Next, $brew install ruby

    Good luck.

  • $ make install

    要不就:

    $brew install libyaml

    下一个, $brew install ruby

    祝你好运。

  • 回答by scottsymm

    This worked for me:

    这对我有用:

    回答by user33302

    Installing ruby with rvm for mac osx, use autolibs to install libyaml and first uninstalling libyaml helps.

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

    This worked for me:

    这对我有用:

    brew uninstall libyaml
    rvm autolibs enable
    rvm reinstall ruby-2.1.1