来自Libyaml错误的Ruby的各种问题

时间:2014-04-14 22:30:10

标签: ruby-on-rails ruby

我一直在尝试学习Ruby on Rails很长一段时间但我一直遇到错误

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

我已尝试重新安装Ruby,Rails,RVM等,但我似乎无处可去。我认为这可能与我的个人资料或libyaml没有联系有关......我是全新的,所以我不太确定。

是否可以删除所有我的红宝石并从新鲜开始?我读过这不是一个好主意,但我看不到任何其他选择。我觉得我已经过多地捅了一些东西,但是我不确定是什么。

这就是布鲁医生所说的:

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:

    /opt/sm/pkg/active/bin/curl-config
    /opt/sm/pkg/active/bin/ncurses5-config
    /opt/sm/pkg/active/bin/ncursesw5-config
    /opt/sm/pkg/active/bin/pkg-config
    /opt/sm/pkg/active/bin/xml2-config
    /opt/sm/pkg/active/bin/xslt-config

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
    /usr/local/lib/libltdl.7.dylib

Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .la files:
    /usr/local/lib/libltdl.la

Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
    /usr/local/lib/pkgconfig/ruby-1.9.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
    /usr/local/lib/libltdl.a
    /usr/local/lib/libruby-static.a

Warning: You have a non-Homebrew 'pkg-config' in your PATH:
  /opt/sm/pkg/active/bin/pkg-config

`./configure` may have problems finding brew-installed packages using
this other pkg-config.

运行dvm install libyaml时出现以下错误:

Error running '__rvm_autoreconf -is --force', showing last 15 lines of /Users/andrewallsop/.rvm/log/1397549620/yaml_autoreconf.log and when running reinstall ruby:  Error running 'requirements_osx_brew_libs_install automake', showing last 15 lines of /Users/andrewallsop/.rvm/log/1397549715_ruby-2.1.1/package_install_automake.log

2 个答案:

答案 0 :(得分:0)

您是否尝试过RVM程序:

rvm pkg install libyaml
rvm reinstall 2.1.1 --with-libyaml-dir=/home/<your user>/.rvm/usr

答案 1 :(得分:0)

我重新安装了小牛队。错误太多,现在效果很好。我的建议?不要在没有任何知识的情况下安装和卸载Ruby。