在Mac Os X 10.9.2上安装Ruby 1.8.7

时间:2014-05-02 03:44:12

标签: ruby rvm osx-mavericks

我需要在Mac Os x 10.9上安装ruby 1.8.7。我遇到了几个问题而没有找到答案。我安装了X代码5.1.1和命令行工具。无论我做什么,我总是得到同样的错误信息:

$ rvm install 1.8.7
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.9/x86_64/ruby-1.8.7-p374.
It is not possible to build movable binaries for rubies 1.8-1.9.2, but you can do it for        your system only.
Continuing with compilation. Please read 'rvm help mount' to get more information on     binary rubies.
Checking requirements for osx_brew.
Installing requirements for osx_brew.
Updating system....
Installing required packages: autoconf, automake, libtool, pkg-config, gcc46, libyaml, readline, libksba, openssl098...
Error running 'requirements_osx_brew_libs_install autoconf automake libtool pkg-config gcc46 libyaml readline libksba openssl098',
showing last 15 lines of /Users/elisabethwork/.rvm/log/1399001508_ruby-1.8.7-p374/package_install_autoconf_automake_libtool_pkg-config_gcc46_libyaml_readline_libksba_openssl098.log
++ case "$1" in
++ [[ -t 1 ]]
++ return 1
++ printf %b 'There were package installation errors, make sure to read the log.

Try `brew tap --repair` and make sure `brew doctor` looks reasonable.

Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation\n'
There were package installation errors, make sure to read the log.

Try `brew tap --repair` and make sure `brew doctor` looks reasonable.

Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation
++ case "$_system_version" in
++ return 1
Requirements installation failed with status: 1.

$ brew doctor

Your system is ready to brew.
你能帮帮我吗?谢谢!

2 个答案:

答案 0 :(得分:1)

请参阅此bash脚本,它允许您在1.8.7和2.0之间切换。无需RVM,brew或其他额外软件:https://gist.github.com/mipmip/7cfbadfcfa5fabe0ba84

答案 1 :(得分:0)

我的情况。我以前自己安装了autoconf libtool模块,而home-brew想要覆盖它。所以你必须手动告诉 brew

brew link --overwrite autoconf
...

您应该运行brew doctor并花些时间阅读以下关键字:错误构建