RVM 未在 Snow Leopard 上安装 Ruby 1.9.2:“运行‘make’时出错" [英] RVM Does Not Install Ruby 1.9.2 on Snow Leopard: 'Error running 'make '

查看:56
本文介绍了RVM 未在 Snow Leopard 上安装 Ruby 1.9.2:“运行‘make’时出错"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在 Snow Leopard 上安装 Ruby 1.9.2 时:

When I try to install Ruby 1.9.2 on Snow Leopard using:

rvm install 1.9.2

我得到以下信息:

ERROR: Error running 'make ', please read /Users/mary/.rvm/log/ruby-1.9.2-p180/make.log
ERROR: There has been an error while running make. Halting the installation.

所以,我查看了 make.log.结尾写着:

So, I check out make.log. The end of it reads:

readline.c: In function ‘username_completion_proc_call’:
readline.c:1386: error: ‘username_completion_function’ undeclared (first use in this 
function)

readline.c:1386: error: (Each undeclared identifier is reported only once
readline.c:1386: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [mkmain.sh] Error 1

我已经咨询了这个问题的其他答案,并完成了那里建议的一切:

I have consulted other answers to this question, and done everything suggested there:

  • XCode 已安装.
  • 在我的 .bash_profile 的末尾添加了以下行:

  • XCode is installed.
  • The end of my .bash_profile has the following line added to it:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

我已尝试更新 readline,但无论如何,我仍然收到有关运行make"的错误消息.

I have tried updating readline, but no matter what, I continue to get the error message about running 'make.'

rvm info 的输出如下:

The output of rvm info is the following:

 system:

  system:
    uname:       "Darwin mary-nunans-computer.local 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386"
    bash:        "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
    zsh:         "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"

  rvm:
    version:      "rvm 1.6.2 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]"

  homes:
    gem:          "not set"
    ruby:         "not set"

  binaries:
    ruby:         "/usr/local/bin/ruby"
    irb:          "/usr/local/bin/irb"
    gem:          "/usr/local/bin/gem"
    rake:         "/usr/local/bin/rake"

  environment:
    PATH:         "/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/usr/X11/bin:/Users/mary/.rvm/bin:/Users/mary/.rvm/bin"
    GEM_HOME:     ""
    GEM_PATH:     ""
    MY_RUBY_HOME: ""
    IRBRC:        ""
    RUBYOPT:      ""
    gemset:       ""

如有任何建议,我们将不胜感激.

Any suggestions would be appreciated.

推荐答案

编译并安装您自己的 readline:

Compile and install your own readline:

curl -O ftp://ftp.gnu.org/gnu/readline/readline-6.1.tar.gz
tar xzvf readline-6.1.tar.gz
cd readline-6.1
./configure --prefix=/usr/local
make
sudo make install
cd ..

移除红宝石:rvm remove 1.9.2

重新安装:rvm install 1.9.2

(如果本地路径不在您的目录中,您可能需要添加源代码:rvm install 1.9.1 -C --with-readline-dir=/usr/local/

(You might need to add source it if local path is not in your directory: rvm install 1.9.1 -C --with-readline-dir=/usr/local/

应该可以.

------------- 编辑--------------

------------- EDIT --------------

如以下评论中所述,如果您使用 homebrew,那么您应该 brew install readline.如果您使用的是 Mac,则应该使用自制软件.

As noted in the comment below, if you use homebrew, then you should brew install readline. And if you're using a Mac, you should be using homebrew.

------------ 如何在 10.7 上编译 READLINE ---------

------------ HOW TO COMPILE READLINE ON 10.7 ---------

Mac OS X 10.7(darwin11)还没有更新readline-6.2,所以打开support/shobj-conf,在出现的两个地方把darwin10改成darwin11."

"readline-6.2 has not been updated for Mac OS X 10.7 (darwin11), so open the support/shobj-conf and change darwin10 to darwin11 in the two places where it appears."

来源:lamboy

这篇关于RVM 未在 Snow Leopard 上安装 Ruby 1.9.2:“运行‘make’时出错"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆